D10198: rebase: inline simple function for finding obsolete subset of commits
martinvonz (Martin von Zweigbergk)
phabricator at mercurial-scm.org
Fri Mar 12 23:50:47 UTC 2021
martinvonz created this revision.
Herald added a reviewer: hg-reviewers.
Herald added a subscriber: mercurial-patches.
REVISION SUMMARY
`_filterobsoleterevs()` is just one line long. It was introduced in
2d294dada4f8 <https://phab.mercurial-scm.org/rHG2d294dada4f833d12ec0a7fbfde4c6d1c58cb800> (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).
REPOSITORY
rHG Mercurial
BRANCH
default
REVISION DETAIL
https://phab.mercurial-scm.org/D10198
AFFECTED FILES
hgext/rebase.py
CHANGE DETAILS
diff --git a/hgext/rebase.py b/hgext/rebase.py
--- a/hgext/rebase.py
+++ b/hgext/rebase.py
@@ -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).
To: martinvonz, #hg-reviewers
Cc: mercurial-patches, mercurial-devel
More information about the Mercurial-devel
mailing list