Comment 4 for bug 334028

Revision history for this message
Brad Burch (brad-burch) wrote : Re: [Bug 334028] Re: svn switch --relocate

Well, when I first issued "bzr switch", it failed outright with:

bzr: ERROR: Unable to connect to target of bound branch
BzrBranch6('/PATH_TO_BZR_CHECKOUT/') => svn://server1/product/trunk: Not a
branch: "svn://server1/product/trunk/".

I attribute the error to the fact that the old svn server had been taken
offline so no new commits crept in. The command may likely have completed
properly if the old svn server was still online, however I didn't have that
luxury.

I suppose I was blinded by my experience with svn, expecting a --relocate
switch. Testing the same scenario again today, I see that --force appears
to work just as --relocate would with svn. This is no bug, just ignorance.
Still, hopefully some poor soul with this same problem in the future will
find this report and not start on the wrong foot as I did.

Thanks,
--Brad Burch

On Tue, Feb 24, 2009 at 3:26 PM, Wesley J. Landaker <email address hidden>wrote:

> FWIW, I started making a reproduction recipe, since I thought I'd seen
> something like this in the past. However, this worked with no trouble
> when I tried in with bzr-svn 0.5dev:
>
> mkdir /tmp/bzr-bug-334028
> cd /tmp/bzr-bug-334028
> svnadmin create svn-repo1
> bzr co svn-repo1 bzr-co
> cd bzr-co
> touch A
> bzr add A
> bzr commit -m "Adding file A"
> cd ..
> svnadmin create svn-repo2
> svnadmin dump svn-repo1 | svnadmin load --force-uuid svn-repo2
> cd bzr-co
> bzr switch ../svn-repo2
>
> Brad, you might try running this example and see if it fails for you --
> perhaps this was a bug in an older version of bzr-svn?
>
> --
> svn switch --relocate
> https://bugs.launchpad.net/bugs/334028
> You received this bug notification because you are a direct subscriber
> of the bug.
>
> Status in Subversion branch support for Bazaar: New
>
> Bug description:
> I ran into a dead-end trying to get my existing bzr checkout to point to
> our new svn server. There is probably a simple way to do this without
> botching it like I did, but hours of searching yielded no help. I ended up
> creating a new checkout and manually merging in my changes, but hopefully
> this report might be of help to others.
>
> I've been working on a somewhat long-running project not being committed to
> svn. These steps have been working great until we moved our svn server.
> Here are the steps:
> 1. existing svn server with history
> 2. bzr checkout svn://server1/product/trunk trunk
> 3. bzr branch trunk MyProject
> 4. make changes in MyProject and bzr commit
> 5. bzr update trunk
> 6. bzr merge trunk MyProject
>
> Then the server was moved to a new server. With svn a simple "svn switch
> --relocate svn://server2/product/trunk" does the trick since the repository
> was loaded with the same UUID. Using "bzr switch" does not work. After I
> started from scratch, I did find a way to relocate the server that seems to
> work, though I'm not certain if there could be ramifications.
>
> Do not use bzr to do any of this, simple edit these files:
> 1. replace the old repository path in subversion.conf with the new svn
> server path
> 2. replace the old repository path in .bzr\branches\branch.conf with the
> new svn server path
>
> After that, "bzr update" seems to work perfectly. Again, I ran a test and
> this seems to work, but there might be more files that need tweaking. It
> might be nice to have a bzr-svn command to do this, or better yet add "bzr
> switch --relocate" like svn.
>