[merge] allow 'bzr branch' even if parent is not accessible

John Arbash Meinel john at arbash-meinel.com
Tue Aug 1 19:03:48 BST 2006


Aaron Bentley wrote:
> John Arbash Meinel wrote:
>>> Aaron Bentley wrote:
>>>> To me, this looks like you've taken something that used to work fine in
>>>> 0.8 and made it fail in 0.9.
>>>>
>>>> In 0.8, I could access a branch by sftp, and if its parent was a local
>>>> path, I could also access its parent.
> 
>>> I think you misunderstand what I changed, so I'll try to make it clearer.
> ...
>>> Which means if you do:
>>>   bzr branch . sftp://foo/bar/
>>>
>>> The foo/bar branch would get a parent of "file:///local/path". (I don't
>>> really like this, but it is what we do)
> 
> I do like this, because it preserves as much information as we can.
> 
>>> We weren't able to do 'bzr branch . sftp://other' in 0.8, so it isn't
>>> really relevant.
> 
> Well, we were able to push, which is similar.  Doesn't push set the parent?

No. Push sets the 'push_location' of *this* branch, but does not set the
parent of the other branch.

...

> If you really want it the parent to be publically accessible, you can do
> bzr branch http://domain/path/a /path/b.
> 
> When some paths are relative and others are absolute, a user never knows
> whether moving a branch around will break pull.
> 
>>> That behavior already exists in bzr.dev (it has since my encoding branch
>>> landed).
> 
> Right, and when I saying you'd broken something that used to work, I was
> including the encoding work and this latest patch.  Using urls
> everywhere was a great thing.  Going to relative ones doesn't seem so
> good to me.
> 
> Don't get me wrong, I'm not vetoing this.  I'm abstaining.  Someone else
> can +1 it if they think it's great.
> 
> Aaron


I think relative urls are right more often than absolute urls. Even
within the same repository if you did:

ssh host
cd /public/place
bzr branch a b

At this point, if you accessed over sftp or http or local filesystem the
parent would point to the right location.
But if you used an absolute url, it would only be accessible from the
local filesystem.

You are fairly unique in doing an exact mirror between your local and
remote machines.

On my machines, my local repository is ~/dev/bzr, but my public
repository is /srv/bzr/public/branches/bzr/

And I think for a lot of people it would be:
/var/www/http/something/

And their local repository would be something in their working tree. (I
can say that Matthieu Moy uses something similar, where he develops in
$HOME, but publishes to a very different location).

I think long term we should update something like 'cbranch' so that you
actually do a remote branch:
	bzr branch sftp://.../mainline sftp://.../feature-branch
	bzr checkout (--lightweight) sftp://.../feature-branch

With lightweight it would end up having parent set correctly for stuff
like 'missing' and 'bundle'.

John
=:->

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 254 bytes
Desc: OpenPGP digital signature
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20060801/abc53cf7/attachment.pgp 


More information about the bazaar mailing list