You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by Phil Endecott <sp...@chezphil.org> on 2007/08/20 19:05:53 UTC
"switch --relocate" and externals
Dear Subversion experts,
I have just switched a working copy from http to https access using
"svn switch --relocate". This worked as expected. However, I have
just remembered that there's an "svn external" in there pointing to
another part of the same repository which needs to change too. How
should I proceed?
I imagine that I may need to "svn switch --relocate" from inside the
external, and also use "svn propedit" to change the external definition
itself. Do I need to do both? If so, in which order? I have
uncommitted changes in the working copy, which I can no longer commit
to the old http: URL.
(Of course, allowing relative URLs of some sort in externals would make
this less of an issue... I don't suppose that's been implemented while
I wasn't looking, has it?)
Many thanks for any advice.
Regards, Phil.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Re: "switch --relocate" and externals
Posted by Phil Endecott <sp...@chezphil.org>.
Ryan Schmidt wrote:
> On Aug 20, 2007, at 14:05, Phil Endecott wrote:
>
>> I have just switched a working copy from http to https access using
>> "svn switch --relocate". This worked as expected. However, I have
>> just remembered that there's an "svn external" in there pointing to
>> another part of the same repository which needs to change too. How
>> should I proceed?
>>
>> I imagine that I may need to "svn switch --relocate" from inside
>> the external, and also use "svn propedit" to change the external
>> definition itself. Do I need to do both? If so, in which order?
>> I have uncommitted changes in the working copy, which I can no
>> longer commit to the old http: URL.
>
> You would need to "svn propedit svn:externals" and change the URL
> from http to https. Then an "svn update" should fix the external
> directory. I think. And then (or before the update) you can "svn
> commit" the change.
Thanks Ryan, and also thanks also Karl for this:
> Try propediting locally after you switch, then run update? (I'm not positive
> that will work; some experimentation may be necessary.)
Based on previous experience I decided to ask the list before doing any
"experimentation", since the story about not digging if you're in a
hole seems to apply to Subversion....
Anyway, I have:
- propedit to change the URL
- switch --relocate inside the external
- commit inside the external (I had uncommited changes)
- update in the directory above, containing the external definition.
Not sure why this was needed.
- commit in this directory to save the change to the external.
This seemed to go OK. Maybe I could have done it in fewer steps.
I have other working copies, so in them I have to:
- update. This seems to automatically switch the external, and seems
safe even if there are uncommited changes (I think).
> The problem with this is that if you ever want to check out an
> earlier version of the project, the external URL will be wrong.
Yes. Ugh. I think the moral is, always use https for everything from
the beginning. Do the appropriate docs suggest this? Of course, you
then run into the general SSL+virtual-hosts pain.
Cheers,
Phil.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Re: "switch --relocate" and externals
Posted by Ryan Schmidt <su...@ryandesign.com>.
On Aug 20, 2007, at 14:05, Phil Endecott wrote:
> I have just switched a working copy from http to https access using
> "svn switch --relocate". This worked as expected. However, I have
> just remembered that there's an "svn external" in there pointing to
> another part of the same repository which needs to change too. How
> should I proceed?
>
> I imagine that I may need to "svn switch --relocate" from inside
> the external, and also use "svn propedit" to change the external
> definition itself. Do I need to do both? If so, in which order?
> I have uncommitted changes in the working copy, which I can no
> longer commit to the old http: URL.
You would need to "svn propedit svn:externals" and change the URL
from http to https. Then an "svn update" should fix the external
directory. I think. And then (or before the update) you can "svn
commit" the change.
The problem with this is that if you ever want to check out an
earlier version of the project, the external URL will be wrong. An
alternative is to dump the entire repository to a txt file, transform
the file to fix all the existing external URLs, and load it into a
new repository. I believe svndumptool can help you with this task:
http://svn.borg.ch/svndumptool/
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Re: "switch --relocate" and externals
Posted by Karl Fogel <kf...@red-bean.com>.
"Phil Endecott" <sp...@chezphil.org> writes:
> I have just switched a working copy from http to https access using
> "svn switch --relocate". This worked as expected. However, I have
> just remembered that there's an "svn external" in there pointing to
> another part of the same repository which needs to change too. How
> should I proceed?
>
> I imagine that I may need to "svn switch --relocate" from inside the
> external, and also use "svn propedit" to change the external
> definition itself. Do I need to do both? If so, in which order? I
> have uncommitted changes in the working copy, which I can no longer
> commit to the old http: URL.
Try propediting locally after you switch, then run update? (I'm not
positive that will work; some experimentation may be necessary.)
> (Of course, allowing relative URLs of some sort in externals would
> make this less of an issue... I don't suppose that's been implemented
> while I wasn't looking, has it?)
Yes, relative externals would be great!
http://subversion.tigris.org/issues/show_bug.cgi?id=1336
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org