pushrebase: bring variable initialization closer to first usage

This commit is contained in:
Olivier Trempe 2017-06-14 16:29:16 -07:00
parent 69a5078ba6
commit 602a765fe6

View File

@ -708,9 +708,6 @@ def bundle2rebase(op, part):
# Seed the mapping with oldonto->onto
mapping[oldonto.node()] = onto.node()
replacements = {}
added = []
# Notify the user of what is being pushed
plural = 's' if len(revs) > 1 else ''
op.repo.ui.warn(_("pushing %s changset%s:\n") % (len(revs), plural))
@ -731,6 +728,9 @@ def bundle2rebase(op, part):
op.repo.manifestlog._revlog._cache = preontocache
onto.manifest()
replacements = {}
added = []
lastdestnode = None
for rev in revs:
newrev = _graft(op.repo, rev, mapping, lastdestnode)