rebase: remove self.destancestors
The state is no longer used after calculating "self.external", therefore
removed.
Differential Revision: https://phab.mercurial-scm.org/D343
--- a/hgext/rebase.py Fri Jul 14 09:01:45 2017 -0700
+++ b/hgext/rebase.py Fri Aug 11 01:05:47 2017 -0700
@@ -148,7 +148,6 @@
self.activebookmark = None
self.dest = None
self.skipped = set()
- self.destancestors = set()
self.collapsef = opts.get('collapse', False)
self.collapsemsg = cmdutil.logmessage(ui, opts)
@@ -336,11 +335,9 @@
(self.originalwd, self.dest, self.state) = result
if self.collapsef:
- self.destancestors = self.repo.changelog.ancestors(
- [self.dest],
- inclusive=True)
- self.external = externalparent(self.repo, self.state,
- self.destancestors)
+ destancestors = self.repo.changelog.ancestors([self.dest],
+ inclusive=True)
+ self.external = externalparent(self.repo, self.state, destancestors)
if dest.closesbranch() and not self.keepbranchesf:
self.ui.status(_('reopening closed branch head %s\n') % dest)
@@ -360,11 +357,6 @@
raise error.Abort(_('cannot collapse multiple named '
'branches'))
- # Rebase
- if not self.destancestors:
- self.destancestors = repo.changelog.ancestors([self.dest],
- inclusive=True)
-
# Keep track of the active bookmarks in order to reset them later
self.activebookmark = self.activebookmark or repo._activebookmark
if self.activebookmark: