repair: pass variable explicitely to nested function
authorPatrick Mezard <pmezard@gmail.com>
Thu, 26 Aug 2010 23:38:13 +0200
changeset 12057 798ef5b19cb1
parent 12054 5d22e631c365
child 12058 1ef70bdd1e62
repair: pass variable explicitely to nested function
mercurial/repair.py
--- a/mercurial/repair.py	Thu Aug 26 11:03:12 2010 -0500
+++ b/mercurial/repair.py	Thu Aug 26 23:38:13 2010 +0200
@@ -35,7 +35,7 @@
 
 def _collectextranodes(repo, files, link):
     """return the nodes that have to be saved before the strip"""
-    def collectone(revlog):
+    def collectone(cl, revlog):
         extra = []
         startrev = count = len(revlog)
         # find the truncation point of the revlog
@@ -57,12 +57,12 @@
 
     extranodes = {}
     cl = repo.changelog
-    extra = collectone(repo.manifest)
+    extra = collectone(cl, repo.manifest)
     if extra:
         extranodes[1] = extra
     for fname in files:
         f = repo.file(fname)
-        extra = collectone(f)
+        extra = collectone(cl, f)
         if extra:
             extranodes[fname] = extra