Submitter | Boris Feld |
---|---|
Date | Sept. 8, 2018, 10:57 a.m. |
Message ID | <45a29cbc741ec23c1c3c.1536404229@localhost.localdomain> |
Download | mbox | patch |
Permalink | /patch/34438/ |
State | Accepted |
Headers | show |
Comments
Patch
diff --git a/mercurial/revlogutils/deltas.py b/mercurial/revlogutils/deltas.py --- a/mercurial/revlogutils/deltas.py +++ b/mercurial/revlogutils/deltas.py @@ -647,6 +647,17 @@ def _refinedgroups(revlog, p1, p2, cache good = yield candidates if good is not None: break + + # if we have a refinable value, try to refine it + if good is not None and good not in (p1, p2) and revlog.issnapshot(good): + # refine snapshot down + previous = None + while previous != good: + previous = good + base = revlog.deltaparent(good) + if base == nullrev: + break + good = yield (base,) # we have found nothing yield None