Re: subversion: svn copy WC URL fails
Re: subversion: svn copy WC URL fails
- Subject: Re: subversion: svn copy WC URL fails
- From: Andreas Grosam <email@hidden>
- Date: Wed, 17 Mar 2010 16:58:34 +0100
On Mar 17, 2010, at 12:26 PM, Jeremy Pereira wrote:
>
> On 17 Mar 2010, at 08:51, Andreas Grosam wrote:
>
>>
>> $ svn copy -m "test" AGC file:///var/svn/repos/MyProject/Applications/tags/Test
>> svn: Commit failed (details follow):
>> svn: Source url 'file://localhost/var/svn/repos/MyProject/AGC/trunk' is from different repository
>> $ ls
>> AGC Demo3
>>
>>
> < SNIP >
>
>>
>> It's strange, because I can successfully copy from URL to URL within the same repository. That is, the command above would work if I would perform it manually.
>
> The answer is simpler than you might think. The problem is that the error message you are being given is slightly misleading (a common problem with Subversion error messages).
>
> Basically, when you made the working copy, you did the following:
>
> svn checkout file://localhost/var/svn/repos/MyProject/AGC/trunk AGC
>
> But you are referring to the repository in your copy using a URL without "localhost" in it. Subversion is complaining that the URLs - specifically, the host part - do not match.
>
> Try this:
>
> svn copy -m "test" AGC file://localhost/var/svn/repos/MyProject/Applications/tags/Test
>
ok, I completely re-created the test repository (via svnadmin):
$sudo svnadmin create /var/svn/repos
Then, I granted myself (non admin account) r/w access to the folder repos and subdirs.
After this, I created directories and imported all files with the GUI tool svnX. I remember that I did not specify the "localhost" whenever a URL was requested. According the book, it is optionally. The svnX app itself does also not use "localhost" when it displays URLs: e.g.: "file:///var/svn/repos/MyProject/AGC/trunk/"
The import went flawlessly.
OK, then after changing minor things, committing and updating, I got your reply - and was curious, whether svn actually stumbles over this:
$ svn copy -m "snapshot" AGC file://localhost/var/svn/repos/MyProject/Applications/tags/Test
svn: Commit failed (details follow):
svn: Source url 'file:///var/svn/repos/MyProject/AGC/trunk' is from different repository
I swear I haven't edited the relevant part of the message issued by svn!! ;)
OK; I took a look at the svnX tool, and it says the AGC URL is "file:///var/svn/MyProject/AGC/trunk
Tried it again - this time without "localhost":
$ svn copy -m "snapshot" AGC file:///var/svn/repos/MyProject/Applications/tags/Demo3-v1.0d3
Committed revision 16.
Well, ... honestly, I have no clue who or what is responsible for setting or not setting respectively ignoring or not ignoring an optional component in a URL ... anyway, that's pretty confusing to say the least.
Nonetheless, your reply was actually the right pointer! Thank you very much, Jeremy.
Could it be that Xcode's import and svnX's import differ in specifying "localhost"? If, then why does svn be so picky about it -- the URLs are actually the same?
Regards
Andreas
> Incidentally, if you really were trying to copy to a different repository, the error message would be completely different - a bit like this:
>
> svn: Repository UUID '3aee420b-b423-4134-8deb-33de5aeee178' doesn't match expected UUID '8212d9a3-1efe-4bd2-9766-b0c8e952b045'
>
>>
>>
>> Andreas
>> _______________________________________________
>> Do not post admin requests to the list. They will be ignored.
>> Xcode-users mailing list (email@hidden)
>> Help/Unsubscribe/Update your Subscription:
>>
>> This email sent to email@hidden
>
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden