Patchwork [2,of,2] record: add new tests for commit interactive (same tests as record)

login
register
mail settings
Submitter Laurent Charignon
Date March 11, 2015, 10:49 p.m.
Message ID <7895efa16ca17bc6784c.1426114169@dev919.prn2.facebook.com>
Download mbox | patch
Permalink /patch/8008/
State Accepted
Commit 7cf9a9e0cf893e7ae82dc576a03c843fd6640438
Headers show

Comments

Laurent Charignon - March 11, 2015, 10:49 p.m.
# HG changeset patch
# User Laurent Charignon <lcharignon@fb.com>
# Date 1426112554 25200
#      Wed Mar 11 15:22:34 2015 -0700
# Node ID 7895efa16ca17bc6784c5f6d1dbf2fe4e2f3d423
# Parent  23cd0220379f9b16a998199189985698abf0f9a7
record: add new tests for commit interactive (same tests as record)
Matt Mackall - March 11, 2015, 11:02 p.m.
On Wed, 2015-03-11 at 15:49 -0700, Laurent Charignon wrote:
> # HG changeset patch
> # User Laurent Charignon <lcharignon@fb.com>
> # Date 1426112554 25200
> #      Wed Mar 11 15:22:34 2015 -0700
> # Node ID 7895efa16ca17bc6784c5f6d1dbf2fe4e2f3d423
> # Parent  23cd0220379f9b16a998199189985698abf0f9a7
> record: add new tests for commit interactive (same tests as record)

These are queued for default, thanks.

Patch

diff --git a/tests/test-record.t b/tests/test-commit-interactive.t
copy from tests/test-record.t
copy to tests/test-commit-interactive.t
--- a/tests/test-record.t
+++ b/tests/test-commit-interactive.t
@@ -15,7 +15,7 @@ 
   $ touch empty-rw
   $ hg add empty-rw
 
-  $ hg record empty-rw<<EOF
+  $ hg commit -i empty-rw<<EOF
   > n
   > EOF
   diff --git a/empty-rw b/empty-rw
@@ -34,7 +34,7 @@ 
 
 Select files but no hunks
 
-  $ hg record empty-rw<<EOF
+  $ hg commit -i  empty-rw<<EOF
   > y
   > n
   > EOF
@@ -55,7 +55,7 @@ 
 
 Record empty file
 
-  $ hg record -d '0 0' -m empty empty-rw<<EOF
+  $ hg commit -i -d '0 0' -m empty empty-rw<<EOF
   > y
   > y
   > EOF
@@ -85,7 +85,7 @@ 
 Rename empty file
 
   $ hg mv empty-rw empty-rename
-  $ hg record -d '1 0' -m rename<<EOF
+  $ hg commit -i -d '1 0' -m rename<<EOF
   > y
   > EOF
   diff --git a/empty-rw b/empty-rename
@@ -106,7 +106,7 @@ 
 Copy empty file
 
   $ hg cp empty-rename empty-copy
-  $ hg record -d '2 0' -m copy<<EOF
+  $ hg commit -i -d '2 0' -m copy<<EOF
   > y
   > EOF
   diff --git a/empty-rename b/empty-copy
@@ -127,7 +127,7 @@ 
 Delete empty file
 
   $ hg rm empty-copy
-  $ hg record -d '3 0' -m delete<<EOF
+  $ hg commit -i -d '3 0' -m delete<<EOF
   > y
   > EOF
   diff --git a/empty-copy b/empty-copy
@@ -149,7 +149,7 @@ 
   $ hg bundle --base -2 tip.bundle
   1 changesets found
   $ hg add tip.bundle
-  $ hg record -d '4 0' -m binary<<EOF
+  $ hg commit -i -d '4 0' -m binary<<EOF
   > y
   > EOF
   diff --git a/tip.bundle b/tip.bundle
@@ -173,7 +173,7 @@ 
 
   $ hg bundle --base -2 tip.bundle
   1 changesets found
-  $ hg record -d '5 0' -m binary-change<<EOF
+  $ hg commit -i -d '5 0' -m binary-change<<EOF
   > y
   > EOF
   diff --git a/tip.bundle b/tip.bundle
@@ -197,7 +197,7 @@ 
   $ hg mv tip.bundle top.bundle
   $ hg bundle --base -2 top.bundle
   1 changesets found
-  $ hg record -d '6 0' -m binary-change-rename<<EOF
+  $ hg commit -i -d '6 0' -m binary-change-rename<<EOF
   > y
   > EOF
   diff --git a/tip.bundle b/top.bundle
@@ -227,7 +227,7 @@ 
   > done
 
   $ hg add plain
-  $ hg record -d '7 0' -m plain plain<<EOF
+  $ hg commit -i -d '7 0' -m plain plain<<EOF
   > y
   > y
   > EOF
@@ -274,7 +274,7 @@ 
 
   $ echo 11 >> plain
   $ unset HGUSER
-  $ hg record --config ui.username= -d '8 0' -m end plain
+  $ hg commit -i --config ui.username= -d '8 0' -m end plain
   abort: no username supplied
   (use "hg config --edit" to set your username)
   [255]
@@ -284,7 +284,7 @@ 
 
   $ HGUSER="test"
   $ export HGUSER
-  $ hg record --config diff.showfunc=true -d '8 0' -m end plain <<EOF
+  $ hg commit -i --config diff.showfunc=true -d '8 0' -m end plain <<EOF
   > y
   > y
   > EOF
@@ -303,7 +303,7 @@ 
 Modify end of plain file, no EOL
 
   $ hg tip --template '{node}' >> plain
-  $ hg record -d '9 0' -m noeol plain <<EOF
+  $ hg commit -i -d '9 0' -m noeol plain <<EOF
   > y
   > y
   > EOF
@@ -325,7 +325,7 @@ 
   $ echo >> plain
   $ echo 1 > plain2
   $ hg add plain2
-  $ hg record -d '10 0' -m eol plain plain2 <<EOF
+  $ hg commit -i -d '10 0' -m eol plain plain2 <<EOF
   > y
   > y
   > y
@@ -361,7 +361,7 @@ 
   > done
   $ echo 2 >> plain2
 
-  $ hg record -d '10 0' -m begin-and-end plain plain2 <<EOF
+  $ hg commit -i -d '10 0' -m begin-and-end plain plain2 <<EOF
   > y
   > y
   > y
@@ -437,7 +437,7 @@ 
 
 Record end
 
-  $ hg record -d '11 0' -m end-only plain <<EOF
+  $ hg commit -i -d '11 0' -m end-only plain <<EOF
   > y
   > n
   > y
@@ -490,7 +490,7 @@ 
 
 Record beginning
 
-  $ hg record -d '12 0' -m begin-only plain <<EOF
+  $ hg commit -i -d '12 0' -m begin-only plain <<EOF
   > y
   > y
   > EOF
@@ -536,7 +536,7 @@ 
 
 Record end
 
-  $ hg record --traceback -d '13 0' -m end-again plain<<EOF
+  $ hg commit -i --traceback -d '13 0' -m end-again plain<<EOF
   > y
   > n
   > y
@@ -577,7 +577,7 @@ 
 
 Record beginning, middle, and test that format-breaking diffopts are ignored
 
-  $ hg record --config diff.noprefix=True -d '14 0' -m middle-only plain <<EOF
+  $ hg commit -i --config diff.noprefix=True -d '14 0' -m middle-only plain <<EOF
   > y
   > y
   > y
@@ -641,7 +641,7 @@ 
 
 Record end
 
-  $ hg record -d '15 0' -m end-only plain <<EOF
+  $ hg commit -i -d '15 0' -m end-only plain <<EOF
   > y
   > y
   > EOF
@@ -683,7 +683,7 @@ 
   adding subdir/a
 
   $ echo a >> a
-  $ hg record -d '16 0' -m subdir-change a <<EOF
+  $ hg commit -i -d '16 0' -m subdir-change a <<EOF
   > y
   > y
   > EOF
@@ -723,7 +723,7 @@ 
 
 Help, quit
 
-  $ hg record <<EOF
+  $ hg commit -i <<EOF
   > ?
   > q
   > EOF
@@ -747,7 +747,7 @@ 
 
 Skip
 
-  $ hg record <<EOF
+  $ hg commit -i <<EOF
   > s
   > EOF
   diff --git a/subdir/f1 b/subdir/f1
@@ -761,7 +761,7 @@ 
 
 No
 
-  $ hg record <<EOF
+  $ hg commit -i <<EOF
   > n
   > EOF
   diff --git a/subdir/f1 b/subdir/f1
@@ -775,7 +775,7 @@ 
 
 f, quit
 
-  $ hg record <<EOF
+  $ hg commit -i <<EOF
   > f
   > q
   > EOF
@@ -792,7 +792,7 @@ 
 
 s, all
 
-  $ hg record -d '18 0' -mx <<EOF
+  $ hg commit -i -d '18 0' -mx <<EOF
   > s
   > a
   > EOF
@@ -822,7 +822,7 @@ 
 
 f
 
-  $ hg record -d '19 0' -my <<EOF
+  $ hg commit -i -d '19 0' -my <<EOF
   > f
   > EOF
   diff --git a/subdir/f1 b/subdir/f1
@@ -851,7 +851,7 @@ 
 
   $ chmod +x f1
   $ echo a >> f1
-  $ hg record -d '20 0' -mz <<EOF
+  $ hg commit -i -d '20 0' -mz <<EOF
   > y
   > y
   > y
@@ -890,7 +890,7 @@ 
 Preserve execute permission on original
 
   $ echo b >> f1
-  $ hg record -d '21 0' -maa <<EOF
+  $ hg commit -i -d '21 0' -maa <<EOF
   > y
   > y
   > y
@@ -928,7 +928,7 @@ 
 
   $ chmod -x f1
   $ echo c >> f1
-  $ hg record -d '22 0' -mab <<EOF
+  $ hg commit -i -d '22 0' -mab <<EOF
   > y
   > y
   > y
@@ -974,7 +974,7 @@ 
 Mock "Preserve chmod +x"
 
   $ echo a >> f1
-  $ hg record -d '20 0' -mz <<EOF
+  $ hg commit -i -d '20 0' -mz <<EOF
   > y
   > y
   > y
@@ -1009,7 +1009,7 @@ 
 Mock "Preserve execute permission on original"
 
   $ echo b >> f1
-  $ hg record -d '21 0' -maa <<EOF
+  $ hg commit -i -d '21 0' -maa <<EOF
   > y
   > y
   > y
@@ -1047,7 +1047,7 @@ 
 
   $ chmod -x f1
   $ echo c >> f1
-  $ hg record -d '22 0' -mab <<EOF
+  $ hg commit -i -d '22 0' -mab <<EOF
   > y
   > y
   > y
@@ -1107,7 +1107,7 @@ 
   1 files updated, 0 files merged, 0 files removed, 0 files unresolved
   (branch merge, don't forget to commit)
 
-  $ hg record -m'will abort'
+  $ hg commit -i -m'will abort'
   abort: cannot partially commit a merge (use "hg commit" instead)
   [255]
 
@@ -1133,7 +1133,7 @@ 
   > This change will be committed
   > This is the third line
   > __EOF__
-  $ HGEDITOR="\"sh\" \"`pwd`/editor.sh\"" hg record -d '23 0' -medit-patch-2 <<EOF
+  $ HGEDITOR="\"sh\" \"`pwd`/editor.sh\"" hg commit -i -d '23 0' -medit-patch-2 <<EOF
   > y
   > e
   > EOF
@@ -1162,7 +1162,7 @@ 
 Trying to edit patch for whole file
 
   $ echo "This is the fourth line" >> editedfile
-  $ hg record <<EOF
+  $ hg commit -i <<EOF
   > e
   > q
   > EOF
@@ -1186,7 +1186,7 @@ 
   > sed -e 's/^[-+]/ /' "$1" > tmp
   > mv tmp "$1"
   > __EOF__
-  $ HGEDITOR="\"sh\" \"`pwd`/editor.sh\"" hg record <<EOF
+  $ HGEDITOR="\"sh\" \"`pwd`/editor.sh\"" hg commit -i <<EOF
   > y
   > e
   > EOF
@@ -1223,7 +1223,7 @@ 
   > sed s/This/That/ "$1" > tmp
   > mv tmp "$1"
   > __EOF__
-  $ HGEDITOR="\"sh\" \"`pwd`/editor.sh\"" hg record <<EOF
+  $ HGEDITOR="\"sh\" \"`pwd`/editor.sh\"" hg commit -i <<EOF
   > y
   > e
   > EOF
@@ -1270,7 +1270,7 @@ 
   > sed -e '/^@/p' "$1" > tmp
   > mv tmp "$1"
   > __EOF__
-  $ HGEDITOR="\"sh\" \"`pwd`/editor.sh\"" hg record <<EOF
+  $ HGEDITOR="\"sh\" \"`pwd`/editor.sh\"" hg commit -i <<EOF
   > y
   > e
   > EOF
@@ -1297,7 +1297,7 @@ 
   > other' "$1" > tmp
   > mv tmp "$1"
   > __EOF__
-  $ HGEDITOR="\"sh\" \"`pwd`/editor.sh\"" hg record <<EOF
+  $ HGEDITOR="\"sh\" \"`pwd`/editor.sh\"" hg commit -i <<EOF
   > y
   > e
   > EOF
@@ -1337,7 +1337,7 @@ 
   $ echo 'warn = no' >> .hg/hgrc
 
   $ echo d >> subdir/f1
-  $ hg record -d '24 0' -mw1 <<EOF
+  $ hg commit -i -d '24 0' -mw1 <<EOF
   > y
   > y
   > EOF
@@ -1374,7 +1374,7 @@ 
 Test --user when ui.username not set
   $ unset HGUSER
   $ echo e >> subdir/f1
-  $ hg record  --config ui.username= -d '8 0' --user xyz -m "user flag" <<EOF
+  $ hg commit -i  --config ui.username= -d '8 0' --user xyz -m "user flag" <<EOF
   > y
   > y
   > EOF
@@ -1407,7 +1407,7 @@ 
   > This is the third line
   > __EOF__
   $ hg add newfile
-  $ HGEDITOR="\"sh\" \"`pwd`/editor.sh\"" hg record -d '23 0' -medit-patch-new <<EOF
+  $ HGEDITOR="\"sh\" \"`pwd`/editor.sh\"" hg commit -i -d '23 0' -medit-patch-new <<EOF
   > y
   > e
   > EOF