Mercurial > public > mercurial-scm > hg
diff mercurial/localrepo.py @ 17009:0c18aed2fcca
revlog: remove reachable and switch call sites to ancestors
This change does a trivial conversion of callsites to ancestors.
Followon diffs will switch the callsites over to revs.
author | Joshua Redstone <joshua.redstone@fb.com> |
---|---|
date | Fri, 08 Jun 2012 08:39:44 -0700 |
parents | a1eb17bed550 |
children | ea97744c4801 |
line wrap: on
line diff
--- a/mercurial/localrepo.py Fri Jun 08 07:59:37 2012 -0700 +++ b/mercurial/localrepo.py Fri Jun 08 08:39:44 2012 -0700 @@ -590,8 +590,10 @@ if latest not in bheads: continue minbhnode = self[bheads[0]].node() - reachable = self.changelog.reachable(latest, minbhnode) - reachable.remove(latest) + cl = self.changelog + ancestors = cl.ancestors([cl.rev(latest)], + cl.rev(minbhnode)) + reachable = [cl.node(rev) for rev in ancestors] if reachable: bheads = [b for b in bheads if b not in reachable] partial[branch] = bheads