Patchwork D7024: destutil: add mechanism to specify ambiguous destination on rebase and merge

login
register
mail settings
Submitter phabricator
Date Oct. 8, 2019, 6:17 p.m.
Message ID <differential-rev-PHID-DREV-djiyclmmqn55bc6236yt-req@mercurial-scm.org>
Download mbox | patch
Permalink /patch/42110/
State Superseded
Headers show

Comments

phabricator - Oct. 8, 2019, 6:17 p.m.
spectral created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.

REVISION SUMMARY
  We've seen some confusion where users specify -t, thinking it means target, and
  are confused when it says to explicitly specify a revision/destination: they
  feel like they already have.

REPOSITORY
  rHG Mercurial

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

AFFECTED FILES
  mercurial/destutil.py

CHANGE DETAILS




To: spectral, #hg-reviewers
Cc: mercurial-devel
phabricator - Oct. 8, 2019, 7:35 p.m.
pulkit added a comment.


  IIUC, you mean `unambiguous` instead of `ambiguous` in the commit message? Re-reading I am confused.

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST ACTION
  https://phab.mercurial-scm.org/D7024/new/

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

To: spectral, #hg-reviewers
Cc: pulkit, mercurial-devel
phabricator - Oct. 8, 2019, 8:50 p.m.
spectral added a comment.


  In D7024#103055 <https://phab.mercurial-scm.org/D7024#103055>, @pulkit wrote:
  
  > IIUC, you mean `unambiguous` instead of `ambiguous` in the commit message? Re-reading I am confused.
  
  Updated the message, see if this works better?

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST ACTION
  https://phab.mercurial-scm.org/D7024/new/

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

To: spectral, #hg-reviewers
Cc: pulkit, mercurial-devel

Patch

diff --git a/mercurial/destutil.py b/mercurial/destutil.py
--- a/mercurial/destutil.py
+++ b/mercurial/destutil.py
@@ -182,14 +182,14 @@ 
                 b"multiple matching bookmarks to merge -"
                 b" please merge with an explicit rev or bookmark"
             ),
-            _(b"run 'hg heads' to see all heads"),
+            _(b"run 'hg heads' to see all heads, specify rev with -r"),
         ),
         b'rebase': (
             _(
                 b"multiple matching bookmarks to rebase -"
                 b" please rebase to an explicit rev or bookmark"
             ),
-            _(b"run 'hg heads' to see all heads"),
+            _(b"run 'hg heads' to see all heads, specify destination with -d"),
         ),
     },
     # no other matching divergent bookmark
@@ -199,47 +199,47 @@ 
                 b"no matching bookmark to merge - "
                 b"please merge with an explicit rev or bookmark"
             ),
-            _(b"run 'hg heads' to see all heads"),
+            _(b"run 'hg heads' to see all heads, specify rev with -r"),
         ),
         b'rebase': (
             _(
                 b"no matching bookmark to rebase - "
                 b"please rebase to an explicit rev or bookmark"
             ),
-            _(b"run 'hg heads' to see all heads"),
+            _(b"run 'hg heads' to see all heads, specify destination with -d"),
         ),
     },
     # branch have too many unbookmarked heads, no obvious destination
     b'toomanyheads': {
         b'merge': (
             _(b"branch '%s' has %d heads - please merge with an explicit rev"),
-            _(b"run 'hg heads .' to see heads"),
+            _(b"run 'hg heads .' to see heads, specify rev with -r"),
         ),
         b'rebase': (
             _(b"branch '%s' has %d heads - please rebase to an explicit rev"),
-            _(b"run 'hg heads .' to see heads"),
+            _(b"run 'hg heads .' to see heads, specify destination with -d"),
         ),
     },
     # branch have no other unbookmarked heads
     b'bookmarkedheads': {
         b'merge': (
             _(b"heads are bookmarked - please merge with an explicit rev"),
-            _(b"run 'hg heads' to see all heads"),
+            _(b"run 'hg heads' to see all heads, specify rev with -r"),
         ),
         b'rebase': (
             _(b"heads are bookmarked - please rebase to an explicit rev"),
-            _(b"run 'hg heads' to see all heads"),
+            _(b"run 'hg heads' to see all heads, specify destination with -d"),
         ),
     },
     # branch have just a single heads, but there is other branches
     b'nootherbranchheads': {
         b'merge': (
             _(b"branch '%s' has one head - please merge with an explicit rev"),
-            _(b"run 'hg heads' to see all heads"),
+            _(b"run 'hg heads' to see all heads, specify rev with -r"),
         ),
         b'rebase': (
             _(b"branch '%s' has one head - please rebase to an explicit rev"),
-            _(b"run 'hg heads' to see all heads"),
+            _(b"run 'hg heads' to see all heads, specify destination with -d"),
         ),
     },
     # repository have a single head