Patchwork [1,of,3,STABLE?] test-merge-tools.t: add 'hg resolve --list' output to tests

login
register
mail settings
Submitter Siddharth Agarwal
Date Nov. 11, 2015, 1:20 a.m.
Message ID <625d11b1fc9b3709335b.1447204827@dev666.prn1.facebook.com>
Download mbox | patch
Permalink /patch/11360/
State Accepted
Headers show

Comments

Siddharth Agarwal - Nov. 11, 2015, 1:20 a.m.
# HG changeset patch
# User Siddharth Agarwal <sid0@fb.com>
# Date 1447204247 28800
#      Tue Nov 10 17:10:47 2015 -0800
# Node ID 625d11b1fc9b3709335b885ccdd753e3062f1ab3
# Parent  5e46123e6c352a01e7adf1785baeb9849e9a2534
test-merge-tools.t: add 'hg resolve --list' output to tests

In upcoming patches we're going to be making some improvements to the ':prompt'
merge tool, and one of them is recovering appropriately from exceptions. It is
important in such cases to make sure that the merge state is written out
properly.

I went through the output and verified that it all makes sense.

Patch

diff --git a/tests/test-merge-tools.t b/tests/test-merge-tools.t
--- a/tests/test-merge-tools.t
+++ b/tests/test-merge-tools.t
@@ -50,6 +50,8 @@  revision 4 - hard to merge
   >   cat f
   >   echo "# hg stat"
   >   hg stat
+  >   echo "# hg resolve --list"
+  >   hg resolve --list
   >   rm -f f.orig
   > }
 
@@ -82,6 +84,8 @@  running from a devel copy, not a temp in
   # hg stat
   M f
   ? f.orig
+  # hg resolve --list
+  U f
 
 simplest hgrc using false for merge:
 
@@ -103,6 +107,8 @@  simplest hgrc using false for merge:
   # hg stat
   M f
   ? f.orig
+  # hg resolve --list
+  U f
 
 #if unix-permissions
 
@@ -150,6 +156,8 @@  true with higher .priority gets preceden
   space
   # hg stat
   M f
+  # hg resolve --list
+  R f
 
 unless lowered on command line:
 
@@ -171,6 +179,8 @@  unless lowered on command line:
   # hg stat
   M f
   ? f.orig
+  # hg resolve --list
+  U f
 
 or false set higher on command line:
 
@@ -192,6 +202,8 @@  or false set higher on command line:
   # hg stat
   M f
   ? f.orig
+  # hg resolve --list
+  U f
 
 or true set to disabled:
   $ beforemerge
@@ -212,6 +224,8 @@  or true set to disabled:
   # hg stat
   M f
   ? f.orig
+  # hg resolve --list
+  U f
 
 or true.executable not found in PATH:
 
@@ -233,6 +247,8 @@  or true.executable not found in PATH:
   # hg stat
   M f
   ? f.orig
+  # hg resolve --list
+  U f
 
 or true.executable with bogus path:
 
@@ -254,6 +270,8 @@  or true.executable with bogus path:
   # hg stat
   M f
   ? f.orig
+  # hg resolve --list
+  U f
 
 but true.executable set to cat found in PATH works:
 
@@ -280,6 +298,8 @@  but true.executable set to cat found in 
   space
   # hg stat
   M f
+  # hg resolve --list
+  R f
 
 and true.executable set to cat with path works:
 
@@ -305,6 +325,8 @@  and true.executable set to cat with path
   space
   # hg stat
   M f
+  # hg resolve --list
+  R f
 
 #if unix-permissions
 
@@ -330,6 +352,8 @@  environment variables in true.executable
   space
   # hg stat
   M f
+  # hg resolve --list
+  R f
 
 #endif
 
@@ -356,6 +380,8 @@  merge-patterns specifies new tool false:
   # hg stat
   M f
   ? f.orig
+  # hg resolve --list
+  U f
 
 merge-patterns specifies executable not found in PATH and gets warning:
 
@@ -380,6 +406,8 @@  merge-patterns specifies executable not 
   # hg stat
   M f
   ? f.orig
+  # hg resolve --list
+  U f
 
 merge-patterns specifies executable with bogus path and gets warning:
 
@@ -404,6 +432,8 @@  merge-patterns specifies executable with
   # hg stat
   M f
   ? f.orig
+  # hg resolve --list
+  U f
 
 ui.merge overrules priority
 
@@ -428,6 +458,8 @@  ui.merge specifies false:
   # hg stat
   M f
   ? f.orig
+  # hg resolve --list
+  U f
 
 ui.merge specifies internal:fail:
 
@@ -447,6 +479,8 @@  ui.merge specifies internal:fail:
   space
   # hg stat
   M f
+  # hg resolve --list
+  U f
 
 ui.merge specifies :local (without internal prefix):
 
@@ -465,6 +499,8 @@  ui.merge specifies :local (without inter
   space
   # hg stat
   M f
+  # hg resolve --list
+  R f
 
 ui.merge specifies internal:other:
 
@@ -483,6 +519,8 @@  ui.merge specifies internal:other:
   space
   # hg stat
   M f
+  # hg resolve --list
+  R f
 
 ui.merge specifies internal:prompt:
 
@@ -503,6 +541,8 @@  ui.merge specifies internal:prompt:
   space
   # hg stat
   M f
+  # hg resolve --list
+  R f
 
 ui.merge specifies internal:dump:
 
@@ -527,6 +567,8 @@  ui.merge specifies internal:dump:
   ? f.local
   ? f.orig
   ? f.other
+  # hg resolve --list
+  U f
 
 f.base:
 
@@ -568,6 +610,8 @@  ui.merge specifies internal:other but is
   # hg stat
   M f
   ? f.orig
+  # hg resolve --list
+  U f
 
 Premerge
 
@@ -592,6 +636,8 @@  ui.merge specifies internal:other but is
   # hg stat
   M f
   ? f.orig
+  # hg resolve --list
+  U f
 
 HGMERGE specifies internal:other but is overruled by --tool=false
 
@@ -615,6 +661,8 @@  HGMERGE specifies internal:other but is 
   # hg stat
   M f
   ? f.orig
+  # hg resolve --list
+  U f
 
   $ unset HGMERGE # make sure HGMERGE doesn't interfere with remaining tests
 
@@ -671,6 +719,8 @@  changed on the filesystem (see also issu
   space
   # hg stat
   M f
+  # hg resolve --list
+  R f
 
 update should also have --tool
 
@@ -712,6 +762,8 @@  update should also have --tool
   # hg stat
   M f
   ? f.orig
+  # hg resolve --list
+  U f
 
 Default is silent simplemerge:
 
@@ -732,6 +784,8 @@  Default is silent simplemerge:
   revision 3
   # hg stat
   M f
+  # hg resolve --list
+  R f
 
 .premerge=True is same:
 
@@ -752,6 +806,8 @@  Default is silent simplemerge:
   revision 3
   # hg stat
   M f
+  # hg resolve --list
+  R f
 
 .premerge=False executes merge-tool:
 
@@ -778,6 +834,8 @@  Default is silent simplemerge:
   space
   # hg stat
   M f
+  # hg resolve --list
+  R f
 
 premerge=keep keeps conflict markers in:
 
@@ -810,6 +868,8 @@  premerge=keep keeps conflict markers in:
   >>>>>>> other: 81448d39c9a0 - test: revision 4
   # hg stat
   M f
+  # hg resolve --list
+  R f
 
 premerge=keep-merge3 keeps conflict markers with base content:
 
@@ -848,6 +908,8 @@  premerge=keep-merge3 keeps conflict mark
   >>>>>>> other: 81448d39c9a0 - test: revision 4
   # hg stat
   M f
+  # hg resolve --list
+  R f
 
 
 Tool execution
@@ -886,6 +948,8 @@  set tools.args explicit to include $base
   space
   # hg stat
   M f
+  # hg resolve --list
+  R f
 
 Merge with "echo mergeresult > $local":
 
@@ -904,6 +968,8 @@  Merge with "echo mergeresult > $local":
   mergeresult
   # hg stat
   M f
+  # hg resolve --list
+  R f
 
 - and $local is the file f:
 
@@ -922,6 +988,8 @@  Merge with "echo mergeresult > $local":
   mergeresult
   # hg stat
   M f
+  # hg resolve --list
+  R f
 
 Merge with "echo mergeresult > $output" - the variable is a bit magic:
 
@@ -940,6 +1008,8 @@  Merge with "echo mergeresult > $output" 
   mergeresult
   # hg stat
   M f
+  # hg resolve --list
+  R f
 
 Merge using tool with a path that must be quoted:
 
@@ -969,6 +1039,8 @@  Merge using tool with a path that must b
   space
   # hg stat
   M f
+  # hg resolve --list
+  R f
 
 Issue3581: Merging a filename that needs to be quoted
 (This test doesn't work on Windows filesystems even on Linux, so check
@@ -1029,6 +1101,8 @@  cat is a bad merge-tool and doesn't chan
   # hg stat
   M f
   ? f.orig
+  # hg resolve --list
+  U f
 
 #if symlink