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

Re: [BUG] moving out of date dir/file before update

From: Ben Collins-Sussman <sussman_at_red-bean.com>
Date: 2005-11-01 12:39:47 CET

Thanks for the descriptions. As you say, these are side-effects of
'mv' being 'cp && rm', and the fact that 'svn up' doesn't follow local
renames.

Issues 2282 and 898 are the relevant issues that describe these problems.

On 10/31/05, Stefano Spinucci <virgo977virgo@yahoo.it> wrote:
> introduction
> ============
>
> The following bugs where found on windows NT, with svn version 1.2.3.
>
> I wrote two 'recipes' to reproduce the bugs, using two working copy.
>
> Before every action you 'll find the wk number in which the action must
> be executed.
>
>
>
> 'file alone' bug
> ================
>
> bug description
> ---------------
>
> I have a file with revision 'n' in the repo and revision 'n-1' in the
> wk.
>
> Then, I move the file in the wk BEFORE updating the wk.
>
> Finally I update the wk and commit the move.
>
> The result is that in the wk and in the repo the file is reverted to
> the
> revision 'n-1', losing the revision 'n'.
>
>
> bug notes
> ---------
>
> I guess it's an expected behavior, since move is copy + delete.
>
> However, for an user without the knowledge of the internal definition
> of
> the move command, I think it can be defined a bug.
>
>
> recipe
> ------
>
> wk 1: create the file 'file.txt' ('file.txt' value is "1")
> wk 1: svn add 'file.txt'
> wk 1: svn ci -m ""
> wk 2: svn up
> wk 2: modify 'file.txt' ('file.txt' value is now "2")
> wk 2: svn ci -m ""
> wk 1: svn move 'file.txt' 'file1.txt'
> wk 1: svn up
> wk 1: svn ci -m ""
> wk 1: BUG: 'file.txt' value is "1"; should be "2". 'file.txt' is not
> deleted
> wk 2: svn up
> wk 2: BUG: 'file.txt' value is "1"; should be "2"
>
>
>
> file 'inside a directory' error
> ===============================
>
> bug description
> ---------------
>
> Inside a directory, I have a file with revision 'n' in the repo and
> revision 'n-1' in the wk.
>
> Then, in the wk I move the directory containing the file BEFORE
> updating
> the wk.
>
> Finally I update the wk and commit the move.
>
> The result is that in the wk the file is still at revision 'n-1', in
> the
> repo the file is correctly at revision 'n' and every further commit of
> the file (from the wrong wk) 'll fail with the error 'Base checksum
> mismatch'.
>
>
> bug notes
> ---------
>
> The good part is that svn don't let to commit from the wrong repo.
>
> The bad part is that maybe unclear what's the source of the error.
>
>
> recipe
> ------
>
> wk 1: svn mkdir 'dir'
> wk 1: create, inside the directory 'dir', the file 'file.txt'
> ('file.txt' value is "1")
> wk 1: svn add 'file.txt'
> wk 1: svn ci -m ""
> wk 2: svn up
> wk 2: modify 'file.txt' ('file.txt' value is now "2")
> wk 2: svn ci -m ""
> wk 1: svn move 'dir' 'dir1'
> wk 1: svn up
> wk 1: svn ci -m ""
> wk 1: BUG: 'file.txt' value is "1"; should be "2"
> wk 2: svn up ('file.txt' value is correctly "2")
> wk 1: svn up (nothing found)
> wk 1: modify 'file.txt' ('file.txt' value is now "3")
> wk 1: svn ci -m "" (failed with the error 'svn: Base checksum mismatch
> on '/dir1/file.txt'')
>
>
>
>
>
>
> __________________________________
> Yahoo! Mail - PC Magazine Editors' Choice 2005
> http://mail.yahoo.com
>
> [BUG] moving out of date dir/file before update
>
> ---
>
> introduction
> ============
>
> The following bugs where found on windows NT, with svn version 1.2.3.
>
> I wrote two 'recipes' to reproduce the bugs, using two working copy.
>
> Before every action you 'll find the wk number in which the action must
> be executed.
>
>
>
> 'file alone' bug
> ================
>
> bug description
> ---------------
>
> I have a file with revision 'n' in the repo and revision 'n-1' in the wk.
>
> Then, I move the file in the wk BEFORE updating the wk.
>
> Finally I update the wk and commit the move.
>
> The result is that in the wk and in the repo the file is reverted to the
> revision 'n-1', losing the revision 'n'.
>
>
> bug notes
> ---------
>
> I guess it's an expected behavior, since move is copy + delete.
>
> However, for an user without the knowledge of the internal definition of
> the move command, I think it can be defined a bug.
>
>
> recipe
> ------
>
> wk 1: create the file 'file.txt' ('file.txt' value is "1")
> wk 1: svn add 'file.txt'
> wk 1: svn ci -m ""
> wk 2: svn up
> wk 2: modify 'file.txt' ('file.txt' value is now "2")
> wk 2: svn ci -m ""
> wk 1: svn move 'file.txt' 'file1.txt'
> wk 1: svn up
> wk 1: svn ci -m ""
> wk 1: BUG: 'file.txt' value is "1"; should be "2". 'file.txt' is not
> deleted
> wk 2: svn up
> wk 2: BUG: 'file.txt' value is "1"; should be "2"
>
>
>
> file 'inside a directory' error
> ===============================
>
> bug description
> ---------------
>
> Inside a directory, I have a file with revision 'n' in the repo and
> revision 'n-1' in the wk.
>
> Then, in the wk I move the directory containing the file BEFORE updating
> the wk.
>
> Finally I update the wk and commit the move.
>
> The result is that in the wk the file is still at revision 'n-1', in the
> repo the file is correctly at revision 'n' and every further commit of
> the file (from the wrong wk) 'll fail with the error 'Base checksum
> mismatch'.
>
>
> bug notes
> ---------
>
> The good part is that svn don't let to commit from the wrong repo.
>
> The bad part is that maybe unclear what's the source of the error.
>
>
> recipe
> ------
>
> wk 1: svn mkdir 'dir'
> wk 1: create, inside the directory 'dir', the file 'file.txt'
> ('file.txt' value is "1")
> wk 1: svn add 'file.txt'
> wk 1: svn ci -m ""
> wk 2: svn up
> wk 2: modify 'file.txt' ('file.txt' value is now "2")
> wk 2: svn ci -m ""
> wk 1: svn move 'dir' 'dir1'
> wk 1: svn up
> wk 1: svn ci -m ""
> wk 1: BUG: 'file.txt' value is "1"; should be "2"
> wk 2: svn up ('file.txt' value is correctly "2")
> wk 1: svn up (nothing found)
> wk 1: modify 'file.txt' ('file.txt' value is now "3")
> wk 1: svn ci -m "" (failed with the error 'svn: Base checksum mismatch
> on '/dir1/file.txt'')
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
> For additional commands, e-mail: dev-help@subversion.tigris.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Tue Nov 1 12:40:41 2005

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.