I'm trying to figure out how to maintain a branch in the repository in
which I have deleted directories and I'm having terrible times doing
merges.
Here's a demo session showing the problem on a very simple case,
hopefully I'm not overly verbose:
/d/glandrum >mkdir svn_test
/d/glandrum >cd svn_test
/d/glandrum/svn_test >mkdir trunk
/d/glandrum/svn_test >svn mkdir -m 'create' svn://marten/Test/trunk
Committed revision 1.
/d/glandrum/svn_test >svn co svn://marten/Test/trunk
Checked out revision 1.
/d/glandrum/svn_test >cd trunk/
/d/glandrum/svn_test/trunk >mkdir dirA
/d/glandrum/svn_test/trunk >mkdir dirB
/d/glandrum/svn_test/trunk >touch dirA/file1.txt
/d/glandrum/svn_test/trunk >touch dirB/file1.txt
/d/glandrum/svn_test/trunk >svn add dirA dirB
A dirA
A dirA\file1.txt
A dirB
A dirB\file1.txt
/d/glandrum/svn_test/trunk >svn commit -m 'added'
Adding dirA
Adding dirA\file1.txt
Adding dirB
Adding dirB\file1.txt
Transmitting file data ..
Committed revision 2.
/d/glandrum/svn_test/trunk >cd ..
/d/glandrum/svn_test >svn mkdir -m 'create' svn://marten/Test/branches
Committed revision 3.
/d/glandrum/svn_test >svn copy -m 'copy' svn://marten/Test/trunk
svn://marten/Test/branches/b1
Committed revision 4.
/d/glandrum/svn_test >svn co svn://marten/Test/branches/b1 branch
A branch\dirA
A branch\dirA\file1.txt
A branch\dirB
A branch\dirB\file1.txt
Checked out revision 4.
/d/glandrum/svn_test >cd branch
/d/glandrum/svn_test/branch >svn remove dirA
D dirA\file1.txt
D dirA
/d/glandrum/svn_test/branch >svn commit -m 'removed'
Deleting dirA
Committed revision 5.
/d/glandrum/svn_test/branch >cd ..
/d/glandrum/svn_test >cd trunk
/d/glandrum/svn_test/trunk >ls
dirA dirB
/d/glandrum/svn_test/trunk >cd dirA
/d/glandrum/svn_test/trunk/dirA >echo "foo" > file1.txt
/d/glandrum/svn_test/trunk/dirA >svn commit -m 'update' file1.txt
Sending file1.txt
Transmitting file data .
Committed revision 6.
/d/glandrum/svn_test/trunk/dirA >mkdir dirA1
/d/glandrum/svn_test/trunk/dirA >touch dirA1/file2
/d/glandrum/svn_test/trunk/dirA >svn add dirA1
A dirA1
A dirA1\file2
/d/glandrum/svn_test/trunk/dirA >svn commit -m 'added' dirA1
Adding dirA1
Adding dirA1\file2
Transmitting file data .
Committed revision 7.
/d/glandrum/svn_test/trunk/dirA >cd ../../branch
/d/glandrum/svn_test/branch >svn merge -r 4:7 svn://marten/Test/trunk
svn: Working copy 'dirA' is missing or not locked
/d/glandrum/svn_test/branch >svn merge -r 4:6 svn://marten/Test/trunk
Skipped missing target: 'dirA\file1.txt'
Skipped missing target: 'dirA'
notice that I can merge so long as I stay away from the revision where
a file in a branch-deleted directory is updated.
The real difficulty comes because later revisions can't be reached:
/d/glandrum/svn_test/branch >cd ../trunk/dirB
/d/glandrum/svn_test/trunk/dirB >touch file2.txt
/d/glandrum/svn_test/trunk/dirB >svn add file2.txt
A file2.txt
/d/glandrum/svn_test/trunk/dirB >svn commit -m 'added' file2.txt
Adding file2.txt
Transmitting file data .
Committed revision 8.
/d/glandrum/svn_test/trunk/dirB >cd ../../branch
/d/glandrum/svn_test/branch >svn merge -r 4:8 svn://marten/Test/trunk
svn: Working copy 'dirA' is missing or not locked
/d/glandrum/svn_test/branch >ls dirB
file1.txt
in the event that it matters, here's the version:
/d/glandrum/svn_test/branch >svn --version
svn, version 1.3.0 (r17949)
compiled Jan 15 2006, 23:18:48
Am I thinking about branches incorrectly? Is this just an impossible use case?
Thanks for any help,
-greg
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Tue May 2 02:12:12 2006