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

Re: Should a working copy always be up-to-date after a successful commit?

From: John Peacock <jpeacock_at_rowman.com>
Date: 2004-05-07 16:55:28 CEST

Roel Harbers wrote:

> Now, I understand that this can be easily fixed with a "svn update"
> before the last commit. But isn't it strange that after I commit, the
> working copy contains an out-of-date directory? Shouldn't a successful
> commit guarantee that the commited wc is up-to-date?
>

No, this is by design. See this link for details:

http://svnbook.red-bean.com/svnbook/ch02s03.html#svn-ch-2-sect-3.4

The long and short of it is that there are circumstances where you don't want a
commit to trigger an automatic update. There are also circumstances where
certain operations will be blocked unless the WC is up-to-date. Both of those
are features of a mixed-revisions model and neither are (AFAIK) likely to change.

If it bothers you overmuch, it shouldn't be too hard to write a wrapper to svn
which does the moral equivalent of

        svn ci $1
        svn up --non-recursive $1

NOTE: I don't think that actually works unless you pass only a directory (or no
directory at all) to the wrapper. The wrapper should be much more intelligent
about what options are also passed on the command line, and whether the target
is a file, directory, or just implied (current directory and below).

John

-- 
John Peacock
Director of Information Research and Technology
Rowman & Littlefield Publishing Group
4501 Forbes Boulevard
Suite H
Lanham, MD  20706
301-459-3366 x.5010
fax 301-429-5748
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Fri May 7 16:55:42 2004

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.