views:

106

answers:

4

After you start tracking the source of a bunch of open source software, how do you keep your code in sync? Run svn update every time you want to look at or play with the code?

It strikes me that it would be better to essentially start mirroring the code with (say) a cron job every night. Have people set up workflows to do this sort of thing? (With alerts when/if any changes you make to the code end up conflicting with the latest update?)

Or am I on my own? (I'm running Mac OS X but interested in general as well as specific solutions.)

A: 

If your repository sends you an email every time someone checks in, why not have a program that checks for those emails and then updates the working copy at that time? This way you're always up to date. Caveats include needlessly burning bandwidth and the possibility of getting odd conflicts when a file you're working on gets updated.

Just updating once a day, or once every few days, is only useful when there are a limited number of people working on a project, all in disparate areas of it. When you've got more than five people, and the possibility that they are working in similar parts of the code, updating once an hour, or more frequently, is much better.

Chris Charabaruk
+3  A: 

The general workflow recommended by the Subversion book is to update your working copy often; at the start of every work-day is a good time. But you don't have to. Just update whenever you feel like seeing the latest changes.

I have a number of open source repositories checked out under a src/ directory. Every couple of days, I remember to run 'svn up *' from that directory, and it updates all the working copies contained there.

Avi
A: 

I will update often really only when I use an open source library in my own application, the external repository will actually be part of my project tree, when I update my project it also updates the external repository. I think when you only look at code for research it will only make sense if you want to look at a new feature they released and then update.

adriaanp
If you're working on something frequently updated by your team, you want to keep up to date on what they're changing as it may affect your own changes. Right?
Chris Charabaruk
A: 

You might want to look into using svn:externals: http://svnbook.red-bean.com/en/1.0/ch07s03.html