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

Re: [BUG] 'svn mv --force', 'svn ci' moves but doesn't commit local modifications

From: Philip Martin <philip_at_codematters.co.uk>
Date: 2006-01-31 23:35:24 CET

Daniel Rall <dlr@collab.net> writes:

> cd /tmp/
> rm -rf repos wc1 wc2
> echo 'Setup a basic WC.'
> svnadmin create repos
> svn co file:///tmp/repos wc1
> echo 'foo' > wc1/file.orig
> svn add wc1/file.orig
> svn ci -m 'Adding new file.' wc1/file.orig
> echo
> echo 'Get a secondary WC'
> svn co file:///tmp/repos wc2
> # Now both WCs contain the file w/ same content.
> echo
> echo 'Modify the contents of a file in the WC'
> echo 'bar' >> wc1/file.orig
> svn mv --force wc1/file.orig wc1/file.new

It's a timestamp bug in mv/copy -- the text-time in the entries file
erroneously matches the working file and so the local mod is not
detected. If you manually "break" the timestamp

touch wc1/file.new

then the correct file contents get committed.

> svn ci -m 'Renaming file w/ additional content.' wc1/file.new wc1/file.orig
> # wc1/file.orig is now gone, and wc1/file.new contains the new content
> echo
> echo 'Update the secondary WC, and examine the content of the file.new'
> svn up wc2
> echo "'svn info' says file.new should be identical in both WCs..."
> diff -u wc1/file.new wc2/file.new
> echo '...but it is not! "bar" is absent from both wc2/file.new, because'
> echo 'it was never actually committed to the repository. wc1 does'
> echo "not report this, and thinks that it's correct and up to date!"

Philip Martin
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Tue Jan 31 23:36:07 2006

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.