fix: only check for obsolete commits in the --rev case
authorMartin von Zweigbergk <martinvonz@google.com>
Fri, 16 Oct 2020 16:00:32 -0700
changeset 45810 09914d934cf4
parent 45809 136a86327316
child 45811 4404f129341e
fix: only check for obsolete commits in the --rev case With both `--all` and `--source`, we already exclude obsolete revisions in the revset, so there's no need to call `checkfixablectx()` in those cases. Differential Revision: https://phab.mercurial-scm.org/D9227
hgext/fix.py
--- a/hgext/fix.py	Fri Oct 16 15:02:46 2020 -0700
+++ b/hgext/fix.py	Fri Oct 16 16:00:32 2020 -0700
@@ -427,8 +427,8 @@
         revs = set(scmutil.revrange(repo, opts[b'rev']))
         if opts.get(b'working_dir'):
             revs.add(wdirrev)
-    for rev in revs:
-        checkfixablectx(ui, repo, repo[rev])
+        for rev in revs:
+            checkfixablectx(ui, repo, repo[rev])
     # Allow fixing only wdir() even if there's an unfinished operation
     if not (len(revs) == 1 and wdirrev in revs):
         cmdutil.checkunfinished(repo)