changeset 2347:5b178298b7f4

use a more reliable way to find what are the new changesets on pull/unbundle The number of csets and the hooks where wrong (negative number of csets) when we unbundled a bundle which contains csets we already had. Remove unused variables.
author Benoit Boissinot <benoit.boissinot@ens-lyon.org>
date Wed, 24 May 2006 10:59:30 +0200
parents 925610b2d90a
children 1772852d7d14
files mercurial/localrepo.py
diffstat 1 files changed, 5 insertions(+), 8 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/localrepo.py	Wed May 24 09:27:16 2006 +0200
+++ b/mercurial/localrepo.py	Wed May 24 10:59:30 2006 +0200
@@ -1508,12 +1508,10 @@
 
             # pull off the changeset group
             self.ui.status(_("adding changesets\n"))
-            co = cl.tip()
+            cor = cl.count() - 1
             chunkiter = changegroup.chunkiter(source)
-            cn = cl.addgroup(chunkiter, csmap, tr, 1) # unique
-            cnr, cor = map(cl.rev, (cn, co))
-            if cn == nullid:
-                cnr = cor
+            cl.addgroup(chunkiter, csmap, tr, 1) # unique
+            cnr = cl.count() - 1
             changesets = cnr - cor
 
             mf = None
@@ -1523,9 +1521,8 @@
 
                 # pull off the manifest group
                 self.ui.status(_("adding manifests\n"))
-                mm = mf.tip()
                 chunkiter = changegroup.chunkiter(source)
-                mo = mf.addgroup(chunkiter, revmap, tr)
+                mf.addgroup(chunkiter, revmap, tr)
 
                 # process the files
                 self.ui.status(_("adding file changes\n"))
@@ -1537,7 +1534,7 @@
                     fl = self.file(f)
                     o = fl.count()
                     chunkiter = changegroup.chunkiter(source)
-                    n = fl.addgroup(chunkiter, revmap, tr)
+                    fl.addgroup(chunkiter, revmap, tr)
                     revisions += fl.count() - o
                     files += 1