[PATCH RFC] cg1packer: use fastpath when changesets are not skipped or reordered

Mike Hommey mh at glandium.org
Sun Apr 12 18:40:26 CDT 2015


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.

Mike


More information about the Mercurial-devel mailing list