0

Is it possible to set up subversion where when someone commits an update to the repository, all working copies that are checked out get updated automatically?

Thank you in advance

1
  • What you want sounds a lot more like Dropbox then SVN.
    – David
    Commented Jan 13, 2014 at 18:08

2 Answers 2

0

No, and if you managed to hack together a solution that did this, I think everybody using it would be upset with you. An svn update forces a merge of any files that the user has modified in their working copy. This merge has the potential to go horribly wrong and lose all their changes if they're not paying attention. In SVN and most other version control systems in common use, the user must explicitly request getting the work other people have done BY DESIGN. This is so a person does not interrupt their own workflow trying to get their changes to compile and run with somebody else's (possibly incomplete) work until they are good and ready to spend the time to get through the merge properly. A DVCS like Mercurial or git (or Fossil or Bazaar or veracity or...) will allow you to pull in changes without merging (and without seeing them in your working copy yet), on those systems it COULD make sense to automatically push changes, but SVN combines the pull with the update so especially in SVN such an automatic update would be a bad idea.

I'll note that version control systems with a "lock, edit, unlock" paradigm actually can work well with an automatic update system. ClearCase works this way, for example. But modern systems are almost always "copy, edit, merge" and therefore do not lend themselves to an automatic update system, since multiple people can work on the same file.

Now, maybe you want specific read-only working copies to get updated automatically, like on a build server or something. THOSE would be a good candidate for a hook script in SVN, or even better a cron job in Unix-like systems or a scheduled task on Windows.

1
  • Thanks much for the info. My thoughts exactly, my users would be quite unhappy.
    – Jim
    Commented Feb 5, 2014 at 17:02
0

No, there isn't. Nothing keeps track of all the working copies. If you know where all the working copies are you could write a hook, that updates all the WCs. But there is no generic method.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .