Patchwork [5,of,7] discovery: make revlogdag work on filtered repo

login
register
mail settings
Submitter Pierre-Yves David
Date Nov. 17, 2013, 8:31 p.m.
Message ID <4dd2da14dc9854f8f75e.1384720304@vulgaris>
Download mbox | patch
Permalink /patch/3035/
State Accepted
Commit 37e2bd56080559810d7f776065b003032ee414e9
Headers show

Comments

Pierre-Yves David - Nov. 17, 2013, 8:31 p.m.
# HG changeset patch
# User Pierre-Yves David <pierre-yves.david@ens-lyon.org>
# Date 1384576035 18000
#      Fri Nov 15 23:27:15 2013 -0500
# Node ID 4dd2da14dc9854f8f75ef2ac20f1d110d8fdff02
# Parent  82c588b045118f0f96e08480e405089822d0348f
discovery: make revlogdag work on filtered repo

The revlogdag class is a core part of discovery. We need its initialisation to
exclude revision filtered out.

Patch

diff --git a/mercurial/dagutil.py b/mercurial/dagutil.py
--- a/mercurial/dagutil.py
+++ b/mercurial/dagutil.py
@@ -147,11 +147,11 @@  class revlogbaseddag(basedag):
 
 class revlogdag(revlogbaseddag):
     '''dag interface to a revlog'''
 
     def __init__(self, revlog):
-        revlogbaseddag.__init__(self, revlog, set(xrange(len(revlog))))
+        revlogbaseddag.__init__(self, revlog, set(revlog))
 
     def _getheads(self):
         return [r for r in self._revlog.headrevs() if r != nullrev]
 
     def parents(self, ix):