diff tests/test-pick.t @ 4800:fa534a8c5863

pick: added support for hg abort This patch isolates abort logic for `hg pick --abort` as `abortpick()`. For independent calls via `hg abort` `hgabortpick()` is created and registered to the state detection API. Results are shown as tests.
author Taapas Agrawal <taapas2897@gmail.com>
date Tue, 06 Aug 2019 00:16:05 +0200
parents 313565dd75e3
children 5cd7d16b8733 a9929dd36405
line wrap: on
line diff
--- a/tests/test-pick.t	Tue Aug 06 00:16:01 2019 +0200
+++ b/tests/test-pick.t	Tue Aug 06 00:16:05 2019 +0200
@@ -1,3 +1,4 @@
+#testcases abortcommand abortflag
 Test for the pick command
 
   $ cat >> $HGRCPATH <<EOF
@@ -8,6 +9,13 @@
   > EOF
   $ echo "evolve=$(echo $(dirname $TESTDIR))/hgext3rd/evolve/" >> $HGRCPATH
 
+#if abortflag
+  $ cat >> $HGRCPATH <<EOF
+  > [alias]
+  > abort = pick --abort
+  > EOF
+#endif
+
   $ mkcommit() {
   >    echo "$1" > "$1"
   >    hg add "$1"
@@ -79,6 +87,11 @@
   $ hg pick --abort
   abort: no interrupted pick state exists
   [255]
+#if abortcommand
+  $ hg abort
+  abort: no operation in progress
+  [255]
+#endif
 
 Specifying both continue and revs
 
@@ -235,7 +248,11 @@
   unresolved merge conflicts (see hg help resolve)
   [1]
 
-  $ hg pick --abort
+#if abortcommand
+  $ hg abort --dry-run
+  pick in progress, will be aborted
+#endif
+  $ hg abort
   aborting pick, updating to c437988de89f
 
   $ hg glog