diff mercurial/destutil.py @ 43114:8197b395710e

destutil: provide hint on rebase+merge for how to specify destination/rev Without a destination specified, rebase and merge attempt to identify a good candidate; this fails if there's too many heads, the heads have a bookmark, or other reasons. Complicating the issue, users may have specified -t, thinking it means target, and are confused when the error message says that they need to specify an explicit rev or explicit destination - they feel like they already have. Differential Revision: https://phab.mercurial-scm.org/D7024
author Kyle Lippincott <spectral@google.com>
date Tue, 08 Oct 2019 19:35:30 -0700
parents 687b865b95ad
children 8ff1ecfadcd1
line wrap: on
line diff
--- a/mercurial/destutil.py	Tue Oct 08 10:40:36 2019 -0700
+++ b/mercurial/destutil.py	Tue Oct 08 19:35:30 2019 -0700
@@ -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