# HG changeset patch # User Mads Kiilerich # Date 2014-02-09 23:52:46 # Node ID 955547eb2e209efb9b316d71bad9c140059ddbde # Parent 9e331f1f05730e8d1e4d37fcba7ff95ec39e992b shelve: publicancestors do not have to visit nullrev Not visiting nullrev seems more correct and might be a minor optimization. diff --git a/hgext/shelve.py b/hgext/shelve.py --- a/hgext/shelve.py +++ b/hgext/shelve.py @@ -22,7 +22,7 @@ shelve". """ 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 @@ def createcmd(ui, repo, pats, opts): """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: