creating checkouts, bound branches and standalone branches from an existing branch

John A Meinel john at arbash-meinel.com
Tue Feb 14 20:34:44 GMT 2006


James Blackwell wrote:
> On Tue, Feb 14, 2006 at 11:55:23AM -0600, John A Meinel wrote:
>>> I think we have lightly-bound branches in the model already anyways. There
>>> are use cases for a branch that is normally bound, that becomes unbound if
>>> a commit can not be sent to the bound-to branch.
>> This is the source of some disagreement within the group. At UBZ, Robert
>> wanted a bound branch to go offline automatically, so that you can
>> commit, but when you come back online, it should refuse to commit if you
>> are out of date.
> 
> hard bound branches have always struck me more of an "all on" or "all off"
> sort of thing in which I have to make a permanant change for a temporary
> problem. If I hop on the plane and commit in a bound branch, I don't want
> to make a permanant indication for a temporary situation.
> 
> I like your --temp idea below. What do you think about adjusting it to
> to the following:
> 
>  1. automatically enable --temp behaviour after two consecutive failures
>  2. exponential backoff of push attempts until a successfull push 
>  3. A notice on every commit that X commits are not pushed

I'm not sure about 'automatic', but maybe. The problem is that I don't
think this is terribly nice:

  bzr commit -m "foo" #failed because bound
  bzr commit -m "foo" #Succeeded, because the last one failed

I think that would be teaching users to retry a command if it fails,
because it might succeed this time. I'd just rather prompt the user for
what they need to do to make it work.

'exponential backoff' seems like it is trying too hard. And gets you
into the "I committed 50 things, so now I won't try to check the remote
branch for 100 new commits".
I might be more amenable if we had some sort of upper limit. Say
something like every 10th commit we try to access the bound location.
Yes, it is a magic number, but I understand James's use case that "I
just commited on a plane, and I don't need it to tell me *everytime*
that it can't access the remote branch".

But I do like the 'notice of X commits not pushed'. Unfortunately, that
requires us to know at what state the other branch is at.
I suppose for a bound branch we could keep a "last_bound_revision" sort
of information. Alternatively, we just keep a plain counter, since it is
only for ui information, not something that has to be 100% accurate.

John
=:->

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


More information about the bazaar mailing list