Patchwork D343: rebase: remove self.destancestors

login
register
mail settings
Submitter phabricator
Date Aug. 16, 2017, 6:33 a.m.
Message ID <82ddce5ce57fa6c509d895bd4bfd266a@localhost.localdomain>
Download mbox | patch
Permalink /patch/23078/
State Not Applicable
Headers show

Comments

phabricator - Aug. 16, 2017, 6:33 a.m.
This revision was automatically updated to reflect the committed changes.
Closed by commit rHGddf77c0cc169: rebase: remove self.destancestors (authored by quark).

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D343?vs=777&id=980

REVISION DETAIL
  https://phab.mercurial-scm.org/D343

AFFECTED FILES
  hgext/rebase.py

CHANGE DETAILS




To: quark, #hg-reviewers, martinvonz
Cc: mercurial-devel

Patch

diff --git a/hgext/rebase.py b/hgext/rebase.py
--- a/hgext/rebase.py
+++ b/hgext/rebase.py
@@ -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: