[PATCH RFC] cg1packer: use fastpath when changesets are not skipped or reordered
Mike Hommey
mh at glandium.org
Sun Apr 12 18:59:05 CDT 2015
On Mon, Apr 13, 2015 at 08:40:26AM +0900, Mike Hommey wrote:
> On Mon, Apr 13, 2015 at 08:15:29AM +0900, Mike Hommey wrote:
> > The current heuristic is that we can use the fast path when the repo is
> > not filtered and the requested heads match the topological heads. This
> > leaves out a lot of cases where the fast path would work just fine.
> >
> > The most obvious one is when there is a race between a push and a http
> > pull, where the puller gets heads before the push, and does the getbundle
> > after, in which case the fast path is not taken because the pulled heads
> > are not topological heads anymore. A sibling case is when the puller
> > requests non-topological heads (such as branch heads that were subsequently
> > merged), or any changeset that appears in the history of another.
>
> Another legitimate case, which is not covered by this patch:
> - consider a changelog like the following:
>
> @ 2
> |
> | o 1
> |/
> o 0
>
> - local clone has 0:1.
> - pulling 2 uses the slow path because `heads` in getsubsetraw only
> contains the nodeid for rev 2, while repo.heads contains 1 and 2.
In fact, the reason why this case is not covered by this patch also
makes this patch regress the case where the local clone has 0 and we
pull 1 and 2, which does use the fast path before the patch but not
after.
Mike
More information about the Mercurial-devel
mailing list