localrepo: use cl throughout in addchangegroup
authorPeter Arrenbrecht <peter.arrenbrecht@gmail.com>
Thu, 14 May 2009 16:09:27 +0200
changeset 8392 7e5cbb09515b
parent 8391 27bffd81d265
child 8393 59160ca338f7
localrepo: use cl throughout in addchangegroup
mercurial/localrepo.py
--- a/mercurial/localrepo.py	Thu May 14 16:00:21 2009 +0200
+++ b/mercurial/localrepo.py	Thu May 14 16:09:27 2009 +0200
@@ -2051,7 +2051,7 @@
                 revisions += len(fl) - o
                 files += 1
 
-            newheads = len(self.changelog.heads())
+            newheads = len(cl.heads())
             heads = ""
             if oldheads and newheads != oldheads:
                 heads = _(" (%+d heads)") % (newheads - oldheads)
@@ -2061,9 +2061,9 @@
                              % (changesets, revisions, files, heads))
 
             if changesets > 0:
-                p = lambda: self.changelog.writepending() and self.root or ""
+                p = lambda: cl.writepending() and self.root or ""
                 self.hook('pretxnchangegroup', throw=True,
-                          node=hex(self.changelog.node(cor+1)), source=srctype,
+                          node=hex(cl.node(cor+1)), source=srctype,
                           url=url, pending=p)
 
             # make changelog see real files again
@@ -2077,11 +2077,11 @@
             # forcefully update the on-disk branch cache
             self.ui.debug(_("updating the branch cache\n"))
             self.branchtags()
-            self.hook("changegroup", node=hex(self.changelog.node(cor+1)),
+            self.hook("changegroup", node=hex(cl.node(cor+1)),
                       source=srctype, url=url)
 
             for i in xrange(cor + 1, cnr + 1):
-                self.hook("incoming", node=hex(self.changelog.node(i)),
+                self.hook("incoming", node=hex(cl.node(i)),
                           source=srctype, url=url)
 
         # never return 0 here: