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
--- 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)