rebase: only change self.state when collapsing in _finishrebase
When the code executes to _finishrebase, self.state should be populated with
correct destinations and do not need to be written to a node. The code was
introduced by
8dc45c9059, which seems to avoid setting state values to None
but it didn't provide more details.
Differential Revision: https://phab.mercurial-scm.org/D346
--- a/hgext/rebase.py Thu Aug 10 22:17:15 2017 -0700
+++ b/hgext/rebase.py Fri Aug 11 01:34:11 2017 -0700
@@ -461,12 +461,10 @@
editor=editor,
keepbranches=self.keepbranchesf,
date=self.date)
- if newnode is None:
- newrev = self.dest
- else:
+ if newnode is not None:
newrev = repo[newnode].rev()
- for oldrev in self.state.iterkeys():
- self.state[oldrev] = newrev
+ for oldrev in self.state.iterkeys():
+ self.state[oldrev] = newrev
if 'qtip' in repo.tags():
updatemq(repo, self.state, self.skipped, **opts)