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

Re: Behaviour of "update" vs. "merge" w.r.t. tree changes (and tree conflicts)

From: David Glasser <glasser_at_davidglasser.net>
Date: Fri, 18 Apr 2008 12:47:18 -0700

On Fri, Apr 18, 2008 at 3:05 AM, Julian Foad <julianfoad_at_btopenworld.com> wrote:
> Enlightenment sought from anybody who can help, on three questions:
> * Update: permits adding a file already scheduled for add
> subversion/libsvn_wc/update_editor.c: add_file()
> /* When adding, there should be nothing with this name unless unversioned
> obstructions are permitted or the obstruction is scheduled for addition
> without history. */
> Why do we allow "update" to add a file that is locally scheduled for
> add-without-history? (And why not also add-with-history?)

Well, for historical reasons, "update doesn't send add-with-history"
(except of course, now it does), so we have to make sure that the
"add-without-history" coming from the server doesn't clobber the
add-with-history in the wc. (Why this is OK at all and not a
conflict, dunno. But this explains the inconsistency.)

> * Update: silently undeletes a deleted file
> subversion/libsvn_wc/update_editor.c: add_file()
> /* sussman sez: If we're trying to add a file that's already in
> `entries' (but not on disk), that's okay. It's probably because
> the user deleted the working version and ran 'svn up' as a means
> of getting the file back.
> This sounds like something we do only because CVS users got used to doing
> it. Normally, "update" only applies changes that have happened in the
> repository. It's presumptious to assume that the user didn't actually want
> the file to go away (but maybe just forgot to use "svn delete").
> I would like to convert this case to a tree conflict. Is there any serious
> benefit to not doing so, and keeping this special case?

In theory, 'svn revert' should always be the way to revert your
changes to BASE. However, this doesn't work if you've deleted whole
directories (we'll fix this in the new wc library), so you have to use
svn update to fix those cases instead. Thus people get in the habit
of using svn update to revert any deletion...


David Glasser | glasser@davidglasser.net | http://www.davidglasser.net/
To unsubscribe, e-mail: dev-unsubscribe_at_subversion.tigris.org
For additional commands, e-mail: dev-help_at_subversion.tigris.org
Received on 2008-04-18 21:47:29 CEST

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

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