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

Re: svn update/diff handles renames confusingly

From: Philip Martin <philip_at_codematters.co.uk>
Date: 2004-02-15 23:35:30 CET

kfogel@collab.net writes:

> Daniel Quinlan <quinlan@pathname.com> writes:
>>
>> After some consideration, my problem seems to boil down to:
>>
>> - svn diff doesn't work across renames
>> - svn update doesn't handle renames at all
>> - svn update conflict resolution for renames is bizarre and confusing
>>
>> Do you guys have a test SVN repository I can use for this?
>
> The second point above is still very surprising to me.

Update doesn't attempt to move the local file, it's simply an add and
a delete. That means that it doesn't work well with local
modifications

$ svnadmin create repo
$ svn import Makefile file://`pwd`/repo/Makefile -m ""
$ svn mv file://`pwd`/repo/Makefile file://`pwd`/repo/Makefile2 -m ""
$ svn co -r1 file://`pwd`/repo wc
$ echo xx >> wc/Makefile
$ svn up wc
A wc/Makefile2
../svn/subversion/libsvn_wc/update_editor.c:823: (apr_err=155000)
svn: Won't delete locally modified file 'Makefile'
$ svn st -v wc
! 2 1 pm wc
                2 2 pm wc/Makefile2
M 1 1 pm wc/Makefile

The update stops at the local mod and leaves the working copy
incomplete.

We could add some sort of move heuristics to update, i.e. attempt to
detect moves as a copy-with-history plus a delete. Or perhaps every
copy-with-history should do a copy in the working copy if the source
is available. I have my doubts about how well heuristics could be
made to work, I'd much prefer a proper atomic move. And a new
libsvn_wc.

-- 
Philip Martin
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Sun Feb 15 23:35:47 2004

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.