# HG changeset patch # User Martin von Zweigbergk # Date 2020-10-16 23:00:32 # Node ID 205c4066ec5d0afd62551f10acb9f85d3c73f9dd # Parent 7f07e6349e51e1e9e0d2668e4231461ec2cb6703 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 diff --git a/hgext/fix.py b/hgext/fix.py --- a/hgext/fix.py +++ b/hgext/fix.py @@ -427,8 +427,8 @@ def getrevstofix(ui, repo, opts): 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)