RE: Merging moved files
From: Simon McClenahan <smcclenahan_at_healthcompartners.com>
Date: 2004-05-14 19:03:48 CEST
OK, if you think this is clearer, I'll start from scratch.
C:\projects\test\trunk>svn list --recursive -v
Create the branch
Modify a file
C:\projects\test\trunk\origdir>svn commit
Meanwhile, do some re-organization
C:\projects\test\branches\reorg>svn move origdir\file.txt newdir
C:\projects\test\branches\reorg>svn commit
Committed revision 17.
C:\projects\test\branches\reorg>svn rm origdir
C:\projects\test\branches\reorg>svn commit
C:\projects\test\branches\reorg>svn update
C:\projects\test\branches\reorg>svn commit
Committed revision 19.
C:\projects\test\branches\reorg>svn update
C:\projects\test\branches\reorg>svn log --stop-on-copy --verbose
removed origdir
------------------------------------------------------------------------
moved file
------------------------------------------------------------------------
Made reorg branch
------------------------------------------------------------------------
Now we're ready to merge back to the trunk. Note that the output from --dry-run does not accurately reflect what actually happens.
C:\projects\test\trunk>svn merge --dry-run -r 16:HEAD http://bart/svn/test/branches/reorg
C:\projects\test\trunk>svn merge -r 16:HEAD http://bart/svn/test/branches/reorg
The issue is that if I commit this, file.txt will be the old version at the time of the reorg. Not very useful at all. Unless I'm not understanding something, the only way to achieve what I want is to painstakingly go back to the branch log and merge each moved directory one at a time. The "major file re-organization task" used as an example in the book isn't so easy after all.
--------------------------
---------------------------------------------------------------------
|
This is an archived mail posted to the Subversion Users mailing list.
This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.