A place where the Joyent community can gather, help each other out, and stay informed.
You are not logged in.
Some time ago I posted a cry of help over at the "How Do I...?" forum asking about "Developing a web app and using subversion".
I've finally had some time to take a better look at this SVN business and seem to have found most of the answers I was looking for. Being familiar to the concept but completely new to versioning in practical terms, I've been trying to catch up by doing quiet a lot of reading.
O'Reilly Media's "Version Control with Subversion" is a must and so are TortoiseSVN's help files (most of which are basically shortened versions of this book). There are also various posts spread throughout the forum that are of great help.
Being a one-man team web-developer I'm only using Subversion for versioning, backups and remote storing of project files.
I was quite comfortable with the checkout, make changes, commit changes process but had no idea how I could get the code from the SVN repository to a live version of the site. I've now found a simple svn export will take care of this but it still wasn't making much sense to me. This is because, in my mind, I wanted to code locally, commit changes to SVN repo and then immediately preview and test the application remotely. I was, in fact, wrong.
I've changed my workflow and now everything makes a whole lot more sense. So, now, this is how I do things:
1. Create online SVN repository at TxD
2. Checkout on my dev machine
3. Code locally
4. Test locally
5. if (test==success) ? go to 6 : go to 3
6. Commit to SVN repo
7. SSH to TxD server and svn export to working directory (somewhere in /web/public/...)
There you go. I think I've nailed it. I feel enlightened and wanted to share it with everyone else. I hope it helps.
Offline
As an alternative to svn export you can always use svn update to put the files in the live version of the site. This has been good for me on large sites as it only copies the updated files to the site. It does however also add the .svn/ directories so you may or may not want to make those web inaccessible.
Offline
juxta wrote:
As an alternative to svn export you can always use svn update to put the files in the live version of the site. This has been good for me on large sites as it only copies the updated files to the site. It does however also add the .svn/ directories so you may or may not want to make those web inaccessible.
I've been trying to understand the pros and cons of using the svn update and the svn export commands. Good point on the fact that svn update will profit large sites. Any other pros and cons to these methods?
Offline
Found an interesting article about Using SVN for Web Development.
Offline
acastro, I use 'svn update' on my sites on TxD for the reasons I stated on my personal site, but I do use 'svn export' in cases where I want to do something like distribute versioned code. It just makes it cleaner without all of those .svn directories in there and I don't allow anonymous updating from my repositories at the moment.
Offline
I'm trying to get Subversion to work. I successfully created my repository (stlyouth.org) through webmin. And I can checkout the repository just fine. But when I try to do my first commit (to upload my project files), I get this error:
subversion/libsvn_client/commit.c:873: (apr_err=175002)
svn: Commit failed (details follow):
subversion/libsvn_ra_dav/util.c:296: (apr_err=175002)
svn: MKACTIVITY of '/svn/stlyouth.org/!svn/act/dbd18025-8115-0410-831c-cfbde604ea70': 400 Bad Request (http://stlyouth.textdriven.com)
I'm connecting through the command-line on Mac OS X, using this command:
svn commit -m 'First try'
Any ideas?
Last edited by joelstein (2006-06-05 21:56:44)
Offline
joelstein wrote:
I'm trying to get Subversion to work. I successfully created my repository (stlyouth.org) through webmin. And I can checkout the repository just fine. But when I try to do my first commit (to upload my project files), I get this error:
Code:
subversion/libsvn_client/commit.c:873: (apr_err=175002)
svn: Commit failed (details follow):
subversion/libsvn_ra_dav/util.c:296: (apr_err=175002)
svn: MKACTIVITY of '/svn/stlyouth.org/!svn/act/dbd18025-8115-0410-831c-cfbde604ea70': 400 Bad Request (http://stlyouth.textdriven.com)
I'm connecting through the command-line on Mac OS X, using this command:Code:
svn commit -m 'First try'
Any ideas?
None here. Might not be a bad idea to submit a ticket.
Offline
Hi,
I've got one question: How do you solve the problem of ownerships and file-permissions?
Say the user of your development-process is "user". But you need to create a directory or file owned by the
apache user wwwrun.
You check this file/directory in and check it out on the productionserver. But how do you get the right
owner and permissions?
TIA,
Jerry
Offline
you can also setup a post-commit hook on the server side to update a working copy on the server (in the web root), so that after you checkout to dev, code on dev, test on dev, commit from dev... boom, it's live and ready for you to double-check...
Offline
Once you have your head firmly around subversion, the next step to take is to start using capistrano. This makes deployment a breeze. You just type "cap deploy" and it logs into textdrive, svn exports a whole new instance of the app, updates symlinks and restarts the server. Makes managing apps/websites a pleasure.
Though, you're using TortoiseSVN which means you're on windows ... not sure about capistrano support on windows.
Offline
Wait, Subversion can be used for that? Why do I even have WinSCP?
Offline
Though, you're using TortoiseSVN which means you're on windows ... not sure about capistrano support on windows.
Capistrano on Windows deploying to a Unix box works just fine. Last I heard, you couldn't deploy to a Windows server using Capistrano, but the other direction is no problem.
Andrew
Offline
juxta wrote:
As an alternative to svn export you can always use svn update to put the files in the live version of the site. This has been good for me on large sites as it only copies the updated files to the site. It does however also add the .svn/ directories so you may or may not want to make those web inaccessible.
I think by default the .xyz files and folders are automatically inaccessible to the net from Apache. Not sure about lightty, or mongrel...
Offline
SaintNick wrote:
juxta wrote:
As an alternative to svn export you can always use svn update to put the files in the live version of the site. This has been good for me on large sites as it only copies the updated files to the site. It does however also add the .svn/ directories so you may or may not want to make those web inaccessible.
I think by default the .xyz files and folders are automatically inaccessible to the net from Apache. Not sure about lightty, or mongrel...
Forbidden
You don't have permission to access /.svn on this server.
Offline