RFC: Initial branch operation order
Martin Pool
mbp at canonical.com
Wed Apr 27 07:31:57 UTC 2011
On 27 April 2011 17:20, John Arbash Meinel <john at arbash-meinel.com> wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> At the moment, our code is a bit cluttered with fetch-like operations,
> leading to bugs like:
> https://bugs.launchpad.net/bzr/+bug/771255
>
> (initial branch doesn't copy tags)
>
> I'm thinking about improving that a bit, but my idea goes against an old
> design from Robert, that I'd like to talk through a bit.
>
> Specifically, BzrDir.sprout() re-implements a lot of Branch.pull (except
> now it doesn't have the tag-fetching code). At least a partial reason is
> because Robert didn't want us to create a proper Branch at the target
> until we had the revisions for it already copied into its Repository. So
> people wouldn't see a new Branch that had no revisions (tip ==
> 'null:'),they would just see NoSuchBranch until the fetch finished.
>
> The biggest reason for the change is that I think it would simplify the
> model (you would always use InterBranch.get() for exchanging the
> revisions, etc.)
That makes sense to me. I think it would remove some cruft and I
can't think of any problems at the moment. I think seeing a branch
that then later updates to point to the right value is in some ways
cleaner, and it might avoid some problems with interrupted operations,
or improve them.
Martin
More information about the bazaar
mailing list