There appears to be a problem with "svn merge", namely that if it
decides that a file needs to be added to the WC, it will "svn copy"
the file from the other leg of the merge. This is the Right Thing in
most cases, but if the other leg is from a different repository than
the WC, it leaves the WC with a file that has been copied from another
repository, and the WC cannot be committed.
(This sequence of operations is not unusual when one is transporting a
release of software from one organization's repository to a vendor
branch in another organization's repository.)
# Check out an old version of a directory and import it into a
# different repository.
+ svn checkout -q \
-r 12944 http://svn.collab.net/repos/svn/trunk/notes/locking \
+ svn import A https://example.org/rep/testproj/dworley/A
Committed revision 148.
# Check out a WC of the test repository's copy.
+ svn checkout https://example.org/rep/testproj/dworley/A B
Checked out revision 148.
# Merge changes between rev 12944 and HEAD of the original repository,
# which include adding the file 'svn-needs-lock-impl.txt'.
+ svn merge https://svn.collab.net/repos/svn/trunk/notes/locking@12944 \
# "svn status" shows that the added file is copied from a repository.
+ svn status B
A + B/svn-needs-lock-impl.txt
# Attempting to commit the WC fails.
+ svn commit B
Waiting for Emacs...Done
svn: Commit failed (details follow):
svn: PROPFIND request failed on
svn: PROPFIND of '/repos/svn/trunk/notes/locking/svn-needs-lock-impl.txt':
405 Method Not Allowed (https://example.org)
# Examining the .svn/entries file shows the copy operation:
+ cat B/.svn/entries
It seems to me that the correct solution is for "svn merge" to check
when it is copying a file from one leg of the merge to the WC to see
whether the source and destination are in the same repository. It can
do this straightforwardly because the repository UUIDs are in the
.svn/entries files. If they are in the same repository, it should
perform an "svn copy" to preserve history, and if they are not, it
should just do an "svn add".
To unsubscribe, e-mail: email@example.com
For additional commands, e-mail: firstname.lastname@example.org
Received on Tue Feb 15 01:54:32 2005