diff hgext/rebase.py @ 46677:7ed7b13fc00a

rebase: inline simple function for finding obsolete subset of commits `_filterobsoleterevs()` is just one line long. It was introduced in 2d294dada4f8 (rebase: small refactoring to allow better extensibility from extensions, 2016-01-14), for use by the "inhibit" extension. That extension was removed from the evolve repo in 87e87881059d (compat: drop the inhibit hacky extension, 2017-10-24). Differential Revision: https://phab.mercurial-scm.org/D10198
author Martin von Zweigbergk <martinvonz@google.com>
date Fri, 12 Feb 2021 16:13:34 -0800
parents 9989a276712f
children 32399d0813e0
line wrap: on
line diff
--- a/hgext/rebase.py	Thu Feb 25 20:57:11 2021 +0100
+++ b/hgext/rebase.py	Fri Feb 12 16:13:34 2021 -0800
@@ -474,7 +474,7 @@
                         )
 
         # Calculate self.obsoletenotrebased
-        obsrevs = _filterobsoleterevs(self.repo, self.state)
+        obsrevs = {r for r in self.state if self.repo[r].obsolete()}
         self._handleskippingobsolete(obsrevs, self.destmap)
 
         # Keep track of the active bookmarks in order to reset them later
@@ -2184,11 +2184,6 @@
     return ret
 
 
-def _filterobsoleterevs(repo, revs):
-    """returns a set of the obsolete revisions in revs"""
-    return {r for r in revs if repo[r].obsolete()}
-
-
 def _computeobsoletenotrebased(repo, rebaseobsrevs, destmap):
     """Return (obsoletenotrebased, obsoletewithoutsuccessorindestination).