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.
--- 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