Mercurial > hg
diff hgext/rebase.py @ 46831:7d80622fc212
rebase: let _handleskippingobsolete(self) read directly from self
The function already has `self` as an argument, so there's no need to
pass data from `self` into it.
Differential Revision: https://phab.mercurial-scm.org/D10246
author | Martin von Zweigbergk <martinvonz@google.com> |
---|---|
date | Fri, 12 Feb 2021 16:19:33 -0800 |
parents | 32399d0813e0 |
children | d95edcbe5c99 |
line wrap: on
line diff
--- a/hgext/rebase.py Tue Mar 23 10:12:58 2021 -0700 +++ b/hgext/rebase.py Fri Feb 12 16:19:33 2021 -0800 @@ -348,20 +348,16 @@ return data - def _handleskippingobsolete(self, obsoleterevs, destmap): - """Compute structures necessary for skipping obsolete revisions - - obsoleterevs: iterable of all obsolete revisions in rebaseset - destmap: {srcrev: destrev} destination revisions - """ + def _handleskippingobsolete(self): + """Compute structures necessary for skipping obsolete revisions""" self.obsoletenotrebased = {} if not self.ui.configbool(b'experimental', b'rebaseskipobsolete'): return - obsoleteset = set(obsoleterevs) + obsoleteset = {r for r in self.state if self.repo[r].obsolete()} ( self.obsoletenotrebased, self.obsoletewithoutsuccessorindestination, - ) = _computeobsoletenotrebased(self.repo, obsoleteset, destmap) + ) = _computeobsoletenotrebased(self.repo, obsoleteset, self.destmap) skippedset = set(self.obsoletenotrebased) skippedset.update(self.obsoletewithoutsuccessorindestination) _checkobsrebase(self.repo, self.ui, obsoleteset, skippedset) @@ -472,8 +468,7 @@ ) # Calculate self.obsoletenotrebased - obsrevs = {r for r in self.state if self.repo[r].obsolete()} - self._handleskippingobsolete(obsrevs, self.destmap) + self._handleskippingobsolete() # Keep track of the active bookmarks in order to reset them later self.activebookmark = self.activebookmark or repo._activebookmark