Different repository root than its parent
Fairly new to working with branches in svn, I'd been merging files from trunk to branch like this for some time:
jenny> svn merge -c 1145 svn+ssh://shia/home/svn/trunk/working/html/drupal5
D sites/all/themes/custom_garlandImagine my confusion when all of a sudden, for no obvious reason, a merge fails with this error:
jenny> svn merge -c 1142 svn+ssh://shia/home/svn/trunk/working/html/drupal5
svn: The URL 'svn+ssh://shia/home/svn/trunk/working/html/drupal5/sites/all/modules/jquery_update' has a different repository root than its parentAfter some googling, I came to the conclusion that there must be some discrepancy between the url I was using to access the repository and the url I had used to check out my working copy. I didn't understand how this could possibly be since previous merges had worked, but checked anyway:
jenny> svn info
Path: .
URL: svn+ssh://jenny@shia/home/svn/branches/jennyandlih
Repository Root: svn+ssh://jenny@shia/home/svn
...There it is, same hostname -- all the articles I found on google were ppl having this problem because they mixed-and-matched different hostnames which resolved to the same machine, confusing svn. Just a sanity check:
jenny> whoami
jennyAs a last resort, I tried explicitly specifying my username, the way it was in the output of svn info. This worked.
jenny> svn merge -c 1142 svn+ssh://jenny@shia/home/svn/trunk/working/html/drupal5
A sites/all/modules/jquery_update
A sites/all/modules/jquery_update/LICENSE.txt
A sites/all/modules/jquery_update/collapse-fix.js
A sites/all/modules/jquery_update/jquery_update.module
A sites/all/modules/jquery_update/compat-1.0.js
A sites/all/modules/jquery_update/jquery.js
A sites/all/modules/jquery_update/README.txt
A sites/all/modules/jquery_update/jquery_update.info
U misc/jquery.jsIt then occured to me that this was the first time I'd ever tried to merge the addition of a directory. Still somewhat baffling, but apparently svn is more picky when merging changes to directories than when merging changes to files. Very strange. Hope someone else will waste less time on this than I did. :P
Oh, and so I never have to go through this again:
jenny> svn switch --relocate svn+ssh://jenny@shia/home/svn svn+ssh://shia/home/svn
That would have taken me
That would have taken me forever to figure out!
Thanks a bunch for posting
This answer worked like a charm, thanks a lot for posting. Also your post is the first one that came for me when I tried to look for an explanation -- that's just icing on the cake :)
Thank you
Yes. It took a lot of Googling to find a relevant answer to this problem. Thanks so much for posting your solution.
Affects any URL mismatch
Thanks for posting this. Just had the same problem, except that my merge was trying from a fully qualified domain name to a sandbox with just the local hostname. (i.e. svn merge -c 1145 http://svn.example.com/trunk/whatever . into a sandbox checked out as http://svn/branch/1.x/whatever)
Wow! Clearly a bug in
Wow!
Clearly a bug in subversion, since the fix has nothing to do with the error message. Hope this gets fixed.
Your post saved me from the same trouble. Thanks.
Thanks!
Thanks so much, you saved me a bunch of time! I had the same problem, kind of. Our IT department changed the url from http://xxx/repos/trunk to http://yyy/repos/trunk.
Thanks!!!
This article saved me.
Excellent page Jenny! This
Excellent page Jenny! This had me stumped until I read this.
Thanks
+1 =)