You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Dmitry Pavlenko <pa...@tmatesoft.com> on 2012/11/15 15:12:13 UTC
SVN 1.6.x: file copy source is lost when moving a containing directory
Hello,
If I move a locally added directory with a moved file, the file's copy-source is lost. The problem is
reproducible with 1.6.x but is not reproducible with 1.7.x.
Is this expected for 1.6?
I've written a test that could be applied to branches/1.6.x:
[[[
Add a test that moves an added directory with a moved file inside. For SVN 1.6.x the file's
copy-source is lost. Currently the test fail.
* subversion/tests/cmdline/copy_tests.py
(move_added_directory_with_moved_file): New.
(test_list): Add new test.
]]]
[[[
Index: subversion/tests/cmdline/copy_tests.py
===================================================================
--- subversion/tests/cmdline/copy_tests.py (revision 1409762)
+++ subversion/tests/cmdline/copy_tests.py (working copy)
@@ -4123,7 +4123,28 @@ def copy_broken_symlink(sbox):
svntest.actions.run_and_verify_status(wc_dir, expected_status)
+def move_added_directory_with_moved_file(sbox):
+ """moving an added directory with a moved file"""
+ sbox.build()
+ wc_dir = sbox.wc_dir
+ X_path = os.path.join(wc_dir, 'X')
+ iota_path = os.path.join(wc_dir, 'iota')
+ X2_path = os.path.join(wc_dir, 'X2')
+
+ svntest.actions.run_and_verify_svn(None, None, [], 'mkdir', X_path)
+ svntest.actions.run_and_verify_svn(None, None, [], 'mv', iota_path, X_path)
+ svntest.actions.run_and_verify_svn(None, None, [], 'mv', X_path, X2_path)
+
+ # check that moved file copy source is not lost
+ expected_status = svntest.actions.get_virginal_state(wc_dir, 1)
+ expected_status.tweak('iota', status='D ')
+ expected_status.add({'X2' : Item(status='A ', wc_rev=0) })
+ expected_status.add({'X2/iota' : Item(status='A+', wc_rev=0) })
+
+ svntest.actions.run_and_verify_status(wc_dir, expected_status)
+
+
########################################################################
# Run the tests
@@ -4207,6 +4228,7 @@ test_list = [ None,
path_move_and_copy_between_wcs_2475,
path_copy_in_repo_2475,
SkipUnless(copy_broken_symlink, svntest.main.is_posix_os),
+ XFail(move_added_directory_with_moved_file),
]
if __name__ == '__main__':
]]]
--
Dmitry Pavlenko,
TMate Software,
http://subgit.com/ - git-svn bridge
Re: SVN 1.6.x: file copy source is lost when moving a containing directory
Posted by Philip Martin <ph...@wandisco.com>.
Philip Martin <ph...@wandisco.com> writes:
> Dmitry Pavlenko <pa...@tmatesoft.com> writes:
>
>> If I move a locally added directory with a moved file, the file's
>> copy-source is lost. The problem is reproducible with 1.6.x but is not
>> reproducible with 1.7.x.
>>
>> Is this expected for 1.6?
>>
>> I've written a test that could be applied to branches/1.6.x:
>
> It's a know issue:
>
> http://subversion.tigris.org/issues/show_bug.cgi?id=3474
So that issue is a copy of an add, not a move. Now move is implemented
as copy+delete so move uses the same copy code, but I suppose we should
explicitly test the move scenario.
--
Certified & Supported Apache Subversion Downloads:
http://www.wandisco.com/subversion/download
Re: SVN 1.6.x: file copy source is lost when moving a containing directory
Posted by Philip Martin <ph...@wandisco.com>.
Dmitry Pavlenko <pa...@tmatesoft.com> writes:
> If I move a locally added directory with a moved file, the file's
> copy-source is lost. The problem is reproducible with 1.6.x but is not
> reproducible with 1.7.x.
>
> Is this expected for 1.6?
>
> I've written a test that could be applied to branches/1.6.x:
It's a know issue:
http://subversion.tigris.org/issues/show_bug.cgi?id=3474
--
Certified & Supported Apache Subversion Downloads:
http://www.wandisco.com/subversion/download