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

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
     15 smcclena May 14 10:43 origdir/
     15 smcclena 24 May 14 10:43 origdir/file.txt

Create the branch
C:\projects\test>svn copy trunk branches/reorg
A branches\reorg

Modify a file
C:\projects\test\trunk\origdir>svn status
M file.txt

C:\projects\test\trunk\origdir>svn commit

Meanwhile, do some re-organization
C:\projects\test\branches\reorg>svn mkdir newdir
A newdir

C:\projects\test\branches\reorg>svn move origdir\file.txt newdir
A newdir\file.txt
D origdir\file.txt

C:\projects\test\branches\reorg>svn commit
Adding reorg\newdir
Adding reorg\newdir\file.txt
Deleting reorg\origdir\file.txt

Committed revision 17.

C:\projects\test\branches\reorg>svn rm origdir
D origdir

C:\projects\test\branches\reorg>svn commit
Deleting reorg\origdir
svn: Commit failed (details follow):
svn:
Item '/branches/reorg/origdir' is out of date

C:\projects\test\branches\reorg>svn update
At revision 18.

C:\projects\test\branches\reorg>svn commit
Deleting reorg\origdir

Committed revision 19.

C:\projects\test\branches\reorg>svn update
At revision 19.

C:\projects\test\branches\reorg>svn log --stop-on-copy --verbose
------------------------------------------------------------------------
r19 | smcclena | 2004-05-14 11:17:23 -0500 (Fri, 14 May 2004) | 2 lines
Changed paths:
   D /branches/reorg/origdir

removed origdir

------------------------------------------------------------------------
r17 | smcclena | 2004-05-14 11:06:30 -0500 (Fri, 14 May 2004) | 2 lines
Changed paths:
   A /branches/reorg/newdir
   A /branches/reorg/newdir/file.txt (from /branches/reorg/origdir/file.txt:16)
   D /branches/reorg/origdir/file.txt

moved file

------------------------------------------------------------------------
r16 | smcclena | 2004-05-14 10:50:18 -0500 (Fri, 14 May 2004) | 2 lines
Changed paths:
   A /branches/reorg (from /trunk:14)
   A /branches/reorg/origdir (from /trunk/origdir:15)

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
A newdir
Skipped missing target: 'newdir\file.txt'
D origdir

C:\projects\test\trunk>svn merge -r 16:HEAD http://bart/svn/test/branches/reorg
A newdir
A newdir\file.txt
D origdir\file.txt
D origdir
D origdir

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.

--------------------------
NOTE: This message and any included attachments are from HealthCom Partners, LLC and are intended only for the addressee(s). The information contained herein may include trade secrets or privileged or otherwise confidential information. Unauthorized review, forwarding, printing, copying, distributing, or using such information is strictly prohibited and may be unlawful. If you received this message in error, or have reason to believe you are not authorized to receive it, please promptly delete this message and notify the sender by e-mail.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Fri May 14 19:04:31 2004

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.