changeset 16628:3c738cb162bf

localrepo: cleanup var names and comments Cosmetic cleanups. Fix comment typo referring to the notion of multiple tips. Make variable describing a generator end in 'gen'. Fix another var containing a node not to end with 'rev'.
author redstone
date Fri, 11 May 2012 10:53:12 -0700
parents 38c45a99be0b
children 1435866c1937
files mercurial/localrepo.py mercurial/repair.py
diffstat 2 files changed, 7 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/localrepo.py	Fri May 11 17:26:58 2012 +0200
+++ b/mercurial/localrepo.py	Fri May 11 10:53:12 2012 -0700
@@ -504,7 +504,7 @@
             partial = self._branchcache
 
         self._branchtags(partial, lrev)
-        # this private cache holds all heads (not just tips)
+        # this private cache holds all heads (not just the branch tips)
         self._branchcache = partial
 
     def branchmap(self):
@@ -584,8 +584,8 @@
                 latest = newnodes.pop()
                 if latest not in bheads:
                     continue
-                minbhrev = self[bheads[0]].node()
-                reachable = self.changelog.reachable(latest, minbhrev)
+                minbhnode = self[bheads[0]].node()
+                reachable = self.changelog.reachable(latest, minbhnode)
                 reachable.remove(latest)
                 if reachable:
                     bheads = [b for b in bheads if b not in reachable]
@@ -1693,7 +1693,7 @@
                     # * missingheads part of comon (::commonheads)
                     common = set(outgoing.common)
                     cheads = [node for node in revs if node in common]
-                    # and 
+                    # and
                     # * commonheads parents on missing
                     revset = self.set('%ln and parents(roots(%ln))',
                                      outgoing.commonheads,
--- a/mercurial/repair.py	Fri May 11 17:26:58 2012 +0200
+++ b/mercurial/repair.py	Fri May 11 10:53:12 2012 -0700
@@ -38,14 +38,14 @@
     """return the changesets which will be broken by the truncation"""
     s = set()
     def collectone(revlog):
-        links = (revlog.linkrev(i) for i in revlog)
+        linkgen = (revlog.linkrev(i) for i in revlog)
         # find the truncation point of the revlog
-        for lrev in links:
+        for lrev in linkgen:
             if lrev >= striprev:
                 break
         # see if any revision after this point has a linkrev
         # less than striprev (those will be broken by strip)
-        for lrev in links:
+        for lrev in linkgen:
             if lrev < striprev:
                 s.add(lrev)