Patchwork D9224: fix: suggest --source instead of --rev on empty revset

login
register
mail settings
Submitter phabricator
Date Oct. 16, 2020, 11:04 p.m.
Message ID <differential-rev-PHID-DREV-dh7ezeiphc2u74rtgt3t-req@mercurial-scm.org>
Download mbox | patch
Permalink /patch/47488/
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
  `--source` is the recommended flag for regular users (`--rev` is
  available for advanced users).

REPOSITORY
  rHG Mercurial

BRANCH
  default

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

AFFECTED FILES
  hgext/fix.py
  tests/test-fix.t

CHANGE DETAILS




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

Patch

diff --git a/tests/test-fix.t b/tests/test-fix.t
--- a/tests/test-fix.t
+++ b/tests/test-fix.t
@@ -246,15 +246,15 @@ 
 
   $ hg fix
   abort: no changesets specified
-  (use --rev or --working-dir)
+  (use --source or --working-dir)
   [255]
   $ hg fix --whole
   abort: no changesets specified
-  (use --rev or --working-dir)
+  (use --source or --working-dir)
   [255]
   $ hg fix --base 0
   abort: no changesets specified
-  (use --rev or --working-dir)
+  (use --source or --working-dir)
   [255]
 
 Fixing a public revision isn't allowed. It should abort early enough that
diff --git a/hgext/fix.py b/hgext/fix.py
--- a/hgext/fix.py
+++ b/hgext/fix.py
@@ -439,7 +439,7 @@ 
         raise error.Abort(b'unresolved conflicts', hint=b"use 'hg resolve'")
     if not revs:
         raise error.Abort(
-            b'no changesets specified', hint=b'use --rev or --working-dir'
+            b'no changesets specified', hint=b'use --source or --working-dir'
         )
     return revs