changeset 45810:09914d934cf4

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
author Martin von Zweigbergk <martinvonz@google.com>
date Fri, 16 Oct 2020 16:00:32 -0700
parents 136a86327316
children 4404f129341e
files hgext/fix.py
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- 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)