changeset 12057:798ef5b19cb1

repair: pass variable explicitely to nested function
author Patrick Mezard <pmezard@gmail.com>
date Thu, 26 Aug 2010 23:38:13 +0200
parents 5d22e631c365
children 1ef70bdd1e62
files mercurial/repair.py
diffstat 1 files changed, 3 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- 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