Patchwork D9227: fix: only check for obsolete commits in the --rev case

login
register
mail settings
Submitter phabricator
Date Oct. 16, 2020, 11:04 p.m.
Message ID <differential-rev-PHID-DREV-pwlhv5hxplam3r65ybs2-req@mercurial-scm.org>
Download mbox | patch
Permalink /patch/47489/
State New
Headers show

Comments

phabricator - Oct. 16, 2020, 11:04 p.m.
martinvonz created this revision.
Herald added a reviewer: hg-reviewers.
Herald added a subscriber: mercurial-patches.

REVISION SUMMARY
  With both `--all` and `--source`, we already exclude obsolete
  revisions in the revset, so there's no need to call
  `checkfixablectx()` in those cases.

REPOSITORY
  rHG Mercurial

BRANCH
  default

REVISION DETAIL
  https://phab.mercurial-scm.org/D9227

AFFECTED FILES
  hgext/fix.py

CHANGE DETAILS




To: martinvonz, #hg-reviewers
Cc: mercurial-patches, mercurial-devel

Patch

diff --git a/hgext/fix.py b/hgext/fix.py
--- a/hgext/fix.py
+++ b/hgext/fix.py
@@ -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)