[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: Julian Foad <julianfoad_at_btopenworld.com>
Date: Fri, 18 Apr 2008 14:16:12 +0100

Andreas Schweigstill wrote:
> Hello!

Hello Andreas. Thanks for your thoughts.

> Julian Foad schrieb:
>> /* 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 don't think that Subversion should assume that a file should be
> removed from the repository if it just had been deleted outside
> Subversion.

I agree. (I didn't suggest it should.)

> I quite often delete a file on the local disk and perform an "svn
> update" in order to be really sure that I get a clean copy from the
> repository. It would be too tedious to use "svn revert" if a directory
> tree contains modified files (which have to be committed later) and
> also modified files which have to be reverted to the clean state.

Why is it too tedious for you to use "svn revert file2 file3 file8" but not too
tedious for you to do what you do, which I'm guessing is something like "rm
file2 file3 file8" followed by "svn update"? The effort looks very similar to me.

> Keep in mind that file deletion could also be a result of some kind
> of build/compile process on the sandbox. In my projects I usually
> try to keep strictly separate directories for source files and
> generated files. In order to be sure to start with a clean environment
> I delete the whole directory structure for generated files and do a
> "svn update". What should "svn revert" do if it finds some files which
> are not versioned? Keep them? Throw them away? The latter would be
> very dangerous if the user just forgot to "svn add" them.

Instead of:

   rm -rf TREE
   svn update TREE

you can use:

   svn update -r0 TREE
   rm -rf TREE
   svn update TREE

Would that be OK for you?

- Julian

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 15:16:40 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.