Mercurial > hg
changeset 8393:59160ca338f7
localrepo: use more direct vars in addchangegroup
author | Peter Arrenbrecht <peter.arrenbrecht@gmail.com> |
---|---|
date | Thu, 14 May 2009 16:11:45 +0200 |
parents | 7e5cbb09515b |
children | 850b5a7c210d |
files | mercurial/localrepo.py |
diffstat | 1 files changed, 6 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/localrepo.py Thu May 14 16:09:27 2009 +0200 +++ b/mercurial/localrepo.py Thu May 14 16:11:45 2009 +0200 @@ -2020,12 +2020,12 @@ trp = weakref.proxy(tr) # pull off the changeset group self.ui.status(_("adding changesets\n")) - cor = len(cl) - 1 + clstart = len(cl) chunkiter = changegroup.chunkiter(source) if cl.addgroup(chunkiter, csmap, trp) is None and not emptyok: raise util.Abort(_("received changelog group is empty")) - cnr = len(cl) - 1 - changesets = cnr - cor + clend = len(cl) + changesets = clend - clstart # pull off the manifest group self.ui.status(_("adding manifests\n")) @@ -2063,7 +2063,7 @@ if changesets > 0: p = lambda: cl.writepending() and self.root or "" self.hook('pretxnchangegroup', throw=True, - node=hex(cl.node(cor+1)), source=srctype, + node=hex(cl.node(clstart)), source=srctype, url=url, pending=p) # make changelog see real files again @@ -2077,10 +2077,10 @@ # forcefully update the on-disk branch cache self.ui.debug(_("updating the branch cache\n")) self.branchtags() - self.hook("changegroup", node=hex(cl.node(cor+1)), + self.hook("changegroup", node=hex(cl.node(clstart)), source=srctype, url=url) - for i in xrange(cor + 1, cnr + 1): + for i in xrange(clstart, clend): self.hook("incoming", node=hex(cl.node(i)), source=srctype, url=url)