Patchwork [1,of,3,evolve-ext] evolve: suggest "hg update -C .", including '.', to abort evolve

login
register
mail settings
Submitter via Mercurial-devel
Date Oct. 28, 2016, 10:22 p.m.
Message ID <d776bbaebc34ff7b0a7e.1477693374@martinvonz.mtv.corp.google.com>
Download mbox | patch
Permalink /patch/17217/
State Accepted
Headers show

Comments

via Mercurial-devel - Oct. 28, 2016, 10:22 p.m.
# HG changeset patch
# User Martin von Zweigbergk <martinvonz@google.com>
# Date 1477692280 25200
#      Fri Oct 28 15:04:40 2016 -0700
# Node ID d776bbaebc34ff7b0a7e822a1fb2f6ea25a5adfa
# Parent  299cdaa24fa563ebf49c1e445e9a4ff122050f7b
evolve: suggest "hg update -C .", including '.', to abort evolve

The user will probably not also want to change commit when they abort
evolve, like "hg update -C" (without the '.') would do. Note that we
already do recommend aborting by using "hg update -C ." in another
place.
timeless - Nov. 4, 2016, 2:30 p.m.
technically this isn't wonderful, if you use bookmarks, `hg up -C .`
isn't equivalent to `hg up -C {currentbookmark}`, and if you're using
hg-git or something that puts significant weight on your active
bookmark, this can lead you into some very unfortunate weeds.
via Mercurial-devel - Nov. 4, 2016, 3:20 p.m.
On Fri, Nov 4, 2016, 07:30 timeless <timeless@gmail.com> wrote:

> technically this isn't wonderful, if you use bookmarks, `hg up -C .`
> isn't equivalent to `hg up -C {currentbookmark}`, and if you're using
> hg-git or something that puts significant weight on your active
> bookmark, this can lead you into some very unfortunate weeds.
>

Good point. There's just no correct way of aborting yet, is there? I
suppose we'll have "hg abort" some day. "hg update -C ." always felt a
little git-like to me in the it reuses a command that happens to be closest
implementation-wise.

>

Patch

diff -r 299cdaa24fa5 -r d776bbaebc34 hgext/evolve.py
--- a/hgext/evolve.py	Sun Oct 16 20:29:27 2016 +0200
+++ b/hgext/evolve.py	Fri Oct 28 15:04:40 2016 -0700
@@ -1946,7 +1946,7 @@ 
             repo.ui.write_err(_('evolve failed!\n'))
             repo.ui.write_err(
                 _('fix conflict and run "hg evolve --continue"'
-                  ' or use "hg update -C" to abort\n'))
+                  ' or use "hg update -C ." to abort\n'))
             raise
 
 def _solvebumped(ui, repo, bumped, dryrun=False, confirm=False,
diff -r 299cdaa24fa5 -r d776bbaebc34 tests/test-evolve.t
--- a/tests/test-evolve.t	Sun Oct 16 20:29:27 2016 +0200
+++ b/tests/test-evolve.t	Fri Oct 28 15:04:40 2016 -0700
@@ -1435,7 +1435,7 @@ 
   merging newfile
   warning: conflicts while merging newfile! (edit, then use 'hg resolve --mark')
   evolve failed!
-  fix conflict and run "hg evolve --continue" or use "hg update -C" to abort
+  fix conflict and run "hg evolve --continue" or use "hg update -C ." to abort
   abort: unresolved merge conflicts (see hg help resolve)
   [255]
 
diff -r 299cdaa24fa5 -r d776bbaebc34 tests/test-stabilize-conflict.t
--- a/tests/test-stabilize-conflict.t	Sun Oct 16 20:29:27 2016 +0200
+++ b/tests/test-stabilize-conflict.t	Fri Oct 28 15:04:40 2016 -0700
@@ -129,7 +129,7 @@ 
   merging babar
   warning: conflicts while merging babar! (edit, then use 'hg resolve --mark')
   evolve failed!
-  fix conflict and run "hg evolve --continue" or use "hg update -C" to abort
+  fix conflict and run "hg evolve --continue" or use "hg update -C ." to abort
   abort: unresolved merge conflicts (see hg help resolve)
   [255]
   $ hg resolve -l
@@ -219,7 +219,7 @@ 
   was merge successful (yn)? n
   merging babar failed!
   evolve failed!
-  fix conflict and run "hg evolve --continue" or use "hg update -C" to abort
+  fix conflict and run "hg evolve --continue" or use "hg update -C ." to abort
   abort: unresolved merge conflicts (see hg help resolve)
   [255]
   $ hg resolve -l
diff -r 299cdaa24fa5 -r d776bbaebc34 tests/test-stabilize-result.t
--- a/tests/test-stabilize-result.t	Sun Oct 16 20:29:27 2016 +0200
+++ b/tests/test-stabilize-result.t	Fri Oct 28 15:04:40 2016 -0700
@@ -84,7 +84,7 @@ 
   merging a
   warning: conflicts while merging a! (edit, then use 'hg resolve --mark')
   evolve failed!
-  fix conflict and run "hg evolve --continue" or use "hg update -C" to abort
+  fix conflict and run "hg evolve --continue" or use "hg update -C ." to abort
   abort: unresolved merge conflicts (see hg help resolve)
   [255]
   $ hg revert -r 'unstable()' a