Mercurial > hg-stable
changeset 20407:955547eb2e20
shelve: publicancestors do not have to visit nullrev
Not visiting nullrev seems more correct and might be a minor optimization.
author | Mads Kiilerich <madski@unity3d.com> |
---|---|
date | Mon, 10 Feb 2014 00:52:46 +0100 |
parents | 9e331f1f0573 |
children | 3392695abd68 |
files | hgext/shelve.py |
diffstat | 1 files changed, 2 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/hgext/shelve.py Mon Feb 10 00:52:16 2014 +0100 +++ b/hgext/shelve.py Mon Feb 10 00:52:46 2014 +0100 @@ -22,7 +22,7 @@ """ from mercurial.i18n import _ -from mercurial.node import nullid, bin, hex +from mercurial.node import nullid, nullrev, bin, hex from mercurial import changegroup, cmdutil, scmutil, phases from mercurial import error, hg, mdiff, merge, patch, repair, util from mercurial import templatefilters @@ -125,7 +125,7 @@ """Compute the heads of the public ancestors of a commit. Much faster than the revset heads(ancestors(ctx) - draft())""" - seen = set() + seen = set([nullrev]) visit = util.deque() visit.append(ctx) while visit: