Welcome Guest, Not a member yet? Register   Sign In
Subversion
#1

[eluser]bennyhill[/eluser]
I program on my own, not in a team. I been reading about Subversion and CVS and just got a new computer so I want to set up my workflow right. Being a single programmer, how should I handle multiple version of files?
#2

[eluser]Mike Ryan[/eluser]
Hi Benny,

Hmm, Windows or Linux? Do you edit the files directly on the server, or upload them to a dev server once you have made your changes?

My setup is probably not perfect, but it works quite nicely for me. Like yourself, I am a single programmer so I do not need the collaborative features of SVN - instead I got fed up with backup_before_making_change*.php all over the place!

Here's what I do:

1) Import directories I will be working on into Subversion (system/application at a minimum)
2) Check out latest version of the project - I use Aptana which has a Subversion plug-in, so checking out is simply opening the editor and updating the project.
3) Make changes
4) Commit changes to svn repository
5) Update the code in the system/application directory by checking out the updated changes (e.g svn co file:///home/mike/svn/repos/ci/application .) I actually have quite a few directories in my project so I wrote a bash script to checkout updated code in to each one.

If you do go with Subversion, check out the svndump command - a simple way to backup your entire repository tree. The most useful feature I have found is branching - just before testing a new feature, create a new branch and make your changes there. If you like it, merge it with the main branch. If not, a couple of clicks and you're back to the original.

My dev server is running Subversion over SSH, so I can checkout code from any computer on which Aptana is installed - in fact, I can not recommend Aptana strongly enough. Great SVN+SSH support, repository browsing with file diff... if I could get code completion working with CodeIgniter it would be perfect.
#3

[eluser]bennyhill[/eluser]
I am running Mac OS X, and edit files locally then upload. Does that change your advice any?
#4

[eluser]Mike Ryan[/eluser]
No, it's the same procedure: Check out locally, modify, check in, check out on the server.

You might want to wait for some more responses though, I'm quite new to Subversion so someone else might have some better ideas.
#5

[eluser]musikanter[/eluser]
I second your advice, Mike Ryan. I don't develop anything without keeping a copy in some SCM.
#6

[eluser]Murodese[/eluser]
Our subversion setup is this:

Each employee checks out a copy of the svn to their local machine. WinSCP uses its "Keep Remote Folder Up To Date" function on the local folder and a working folder on a development server via SFTP. This means that while the user is working locally, they can see the working copy of their site at http://url/working/username/.

When a user commits, post-commit hooks kick in and do a couple of things;

1) Updates the trunk demo copy at http://url/trunk/
2) Automatically parses commit comments for trac closes etc
3) Generates phpdoc documentation at http://url/docs/

This basically means that the user can use built-in svn tools in their ide in order to do various svn tasks, but don't have to resort to a command line on the server to work permanently on their remote copy.

Obviously in your case you'd want something simpler, but I figured this might give you some ideas :V
#7

[eluser]ray73864[/eluser]
[quote author="Murodese" date="1226568696"]Our subversion setup is this:

Each employee checks out a copy of the svn to their local machine. WinSCP uses its "Keep Remote Folder Up To Date" function on the local folder and a working folder on a development server via SFTP. This means that while the user is working locally, they can see the working copy of their site at http://url/working/username/.

When a user commits, post-commit hooks kick in and do a couple of things;

1) Updates the trunk demo copy at http://url/trunk/
2) Automatically parses commit comments for trac closes etc
3) Generates phpdoc documentation at http://url/docs/

This basically means that the user can use built-in svn tools in their ide in order to do various svn tasks, but don't have to resort to a command line on the server to work permanently on their remote copy.

Obviously in your case you'd want something simpler, but I figured this might give you some ideas :V[/quote]

ooooh, interesting, got any tutorials on how to set up something like this?
#8

[eluser]Murodese[/eluser]
[quote author="ray73864" date="1226579990"]ooooh, interesting, got any tutorials on how to set up something like this?[/quote]

I'll post something later on.
#9

[eluser]Murodese[/eluser]
http://ellislab.com/forums/viewthread/96843/
#10

[eluser]rogierb[/eluser]
I'm absolutely addicted to SVN. All of our projects are in ( the same ) SVN.
Here's out setup:

- Linux server with test sites, db and SVN
- Local windows (don't start!) machines running wamp
- live servers running svn client

How we work:
- We checkout locally (eg. http://local-linux/repository/project-x/trunk )
- we edit locally
- update locally before commiting(someone might have changed the same file)
- commit changes
- a post commit hook updates the appropriate tests-site and mails changes to me

We update the live server when everything has been tested.

I got the same setup @home and it work wonderfully well.

The only drawback is having to work locally on windows when the live-site is on linux. As we all know(:-)) windows does not "work" the same as linux

@Murodese: I like your setup, might try it someday. Saves running WAMP and having to deal with differences between windows and linux




Theme © iAndrew 2016 - Forum software by © MyBB