[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: Need Info on Auto Update

From: Ryan Schmidt <subversion-2006c_at_ryandesign.com>
Date: 2006-08-24 12:02:43 CEST

On Aug 24, 2006, at 11:07, Manish holey wrote:

>>> I am new member to this community , I need an urgent info. I want
>>> to know how to make auto update for SVN? This is very urgent for
>>> me. Please reply ASAP.
>> What does it mean to you to auto-update? Are we talking about a
>> working copy here? Are you asking for a way to automatically have the
>> equivalent of "svn up" run on a working copy periodically without
>> having to say "svn up"? Why do you want this? Or if that's not it,
>> then what are you trying to accomplish?
> I am trying to explain. We are having a working copy of SVN. Also
> we having a constant changes in or documents, to see that always we
> have to make sure to "SVN Update". Suppose somebody is missing to
> do that & refer the old version then it could cause conflicts, so I
> need to make the automatic update on all or some folders ( which
> "update-prone"). Please suggest.

On Unix-like operating systems, including Linux, FreeBSD and Mac OS
X, you could use cron to schedule an "svn up" to occur however often
you wanted it to. I do not use Windows, but since "everybody" uses
Windows there must be equivalent functionality available somehow.

But automatically updating a user's working copy is likely to cause
bad things to happen. Imagine user A starts editing a document at
12:00 with the current version of the document. It takes him half an
hour to make his changes. But at 12:05 user B edits the same version
of the document to correct a typo and commits it at 12:06. Maybe
you've used cron to schedule an automatic update to occur every 10
minutes for user A, so at 12:10 the update occurs. One of two things
could now happen. On the one hand, if user A had already saved some
intermediate stage of their editing, a conflict occurs. Perhaps you
have arranged for the output of the svn up command to be displayed to
the user somehow. Perhaps you send it by email (which would introduce
some delay). The user then sees the conflict and has to resolve it
right away, distracting them from the real work they were trying to
do. On the other hand, if the user had not yet saved any changes,
then the file on disk would not have been changed yet, and the svn up
would happily replace that file with the new one where user B fixed
the typo. And then, when user A finally saves their work, the work
from user B is undone, without any warning to either user.

So I do not believe that an automated update is the correct solution
to the problem. It sounds like more of a training issue. Before you
start working on a document, you should run an svn up. End of story.
Users who fail to do this will encounter conflicts, which will teach
them that they should have done an svn up first. Even if you do run
svn up regularly, you can run into conflicts, as the scenario above
shows. So users must be adept at resolving conflicts.

Something you can do is set up a commit mailing list. Anytime
somebody commits something, a mail goes out to the team. Any team
member can then glance at their email to see what documents are being
edited, so they'll know if they need to update or not. Though running
svn up is probably just as easy as glancing in the email program, and
more likely to be effective, since email could be delayed.

To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Thu Aug 24 12:04:12 2006

This is an archived mail posted to the Subversion Users mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.