Mercurial > public > mercurial-scm > hg-stable
diff tests/test-commit-interactive.t @ 42566:f802a75da585
patch: use a short, fixed-size message for last line of prompt (issue6158)
See issue6158 and the previous commit for examples of what might go wrong if we
have some combinations of readline version and terminal and need to wrap the
line.
Briefly: readline may not display the beginning of the last line of the prompt,
or it may print over it with the end of the prompt, making it difficult for
users to know what's going on.
Differential Revision: https://phab.mercurial-scm.org/D6563
author | Kyle Lippincott <spectral@google.com> |
---|---|
date | Thu, 20 Jun 2019 14:45:52 -0700 |
parents | e45c6b153e51 |
children | ebf353aa4385 |
line wrap: on
line diff
--- a/tests/test-commit-interactive.t Thu Jun 20 11:40:47 2019 -0700 +++ b/tests/test-commit-interactive.t Thu Jun 20 14:45:52 2019 -0700 @@ -100,7 +100,8 @@ diff --git a/empty-rw b/empty-rename rename from empty-rw rename to empty-rename - examine changes to 'empty-rw' and 'empty-rename'? [Ynesfdaq?] y + examine changes to 'empty-rw' and 'empty-rename'? + (enter ? for help) [Ynesfdaq?] y $ hg tip -p @@ -121,7 +122,8 @@ diff --git a/empty-rename b/empty-copy copy from empty-rename copy to empty-copy - examine changes to 'empty-rename' and 'empty-copy'? [Ynesfdaq?] y + examine changes to 'empty-rename' and 'empty-copy'? + (enter ? for help) [Ynesfdaq?] y $ hg tip -p @@ -141,7 +143,8 @@ > EOF diff --git a/empty-copy b/empty-copy deleted file mode 100644 - examine changes to 'empty-copy'? [Ynesfdaq?] y + examine changes to 'empty-copy'? + (enter ? for help) [Ynesfdaq?] y $ hg tip -p @@ -164,7 +167,8 @@ diff --git a/tip.bundle b/tip.bundle new file mode 100644 this is a binary file - examine changes to 'tip.bundle'? [Ynesfdaq?] y + examine changes to 'tip.bundle'? + (enter ? for help) [Ynesfdaq?] y $ hg tip -p @@ -187,7 +191,8 @@ > EOF diff --git a/tip.bundle b/tip.bundle this modifies a binary file (all or nothing) - examine changes to 'tip.bundle'? [Ynesfdaq?] y + examine changes to 'tip.bundle'? + (enter ? for help) [Ynesfdaq?] y $ hg tip -p @@ -213,7 +218,8 @@ rename from tip.bundle rename to top.bundle this modifies a binary file (all or nothing) - examine changes to 'tip.bundle' and 'top.bundle'? [Ynesfdaq?] y + examine changes to 'tip.bundle' and 'top.bundle'? + (enter ? for help) [Ynesfdaq?] y $ hg tip -p @@ -253,7 +259,8 @@ +8 +9 +10 - record this change to 'plain'? [Ynesfdaq?] y + record this change to 'plain'? + (enter ? for help) [Ynesfdaq?] y $ hg tip -p changeset: 7:11fb457c1be4 @@ -302,7 +309,8 @@ 9 10 +11 - record this change to 'plain'? [Ynesfdaq?] y + record this change to 'plain'? + (enter ? for help) [Ynesfdaq?] y Modify end of plain file, no EOL @@ -320,7 +328,8 @@ 11 +7264f99c5f5ff3261504828afa4fb4d406c3af54 \ No newline at end of file - record this change to 'plain'? [Ynesfdaq?] y + record this change to 'plain'? + (enter ? for help) [Ynesfdaq?] y Record showfunc should preserve function across sections @@ -401,7 +410,8 @@ > EOF diff --git a/f1.py b/f1.py 3 hunks, 6 lines changed - examine changes to 'f1.py'? [Ynesfdaq?] y + examine changes to 'f1.py'? + (enter ? for help) [Ynesfdaq?] y @@ -2,8 +2,8 @@ def annotate(ui, repo, *pats, **opts): """show changeset information by line for each file @@ -413,7 +423,8 @@ This command is useful for discovering when a change was made and by whom. - record change 1/3 to 'f1.py'? [Ynesfdaq?] y + record change 1/3 to 'f1.py'? + (enter ? for help) [Ynesfdaq?] y @@ -6,11 +6,7 @@ def annotate(ui, repo, *pats, **opts): @@ -427,7 +438,8 @@ Without the -a/--text option, annotate will avoid processing files it detects as binary. With -a, annotate will annotate the file anyway, although the results will probably be neither useful - record change 2/3 to 'f1.py'? [Ynesfdaq?] y + record change 2/3 to 'f1.py'? + (enter ? for help) [Ynesfdaq?] y @@ -26,7 +22,7 @@ def archive(ui, repo, dest, **opts): directory; use -r/--rev to specify a different revision. @@ -438,7 +450,8 @@ .. container:: verbose - record change 3/3 to 'f1.py'? [Ynesfdaq?] y + record change 3/3 to 'f1.py'? + (enter ? for help) [Ynesfdaq?] y Modify end of plain file, add EOL @@ -461,13 +474,15 @@ -7264f99c5f5ff3261504828afa4fb4d406c3af54 \ No newline at end of file +7264f99c5f5ff3261504828afa4fb4d406c3af54 - record change 1/2 to 'plain'? [Ynesfdaq?] y + record change 1/2 to 'plain'? + (enter ? for help) [Ynesfdaq?] y diff --git a/plain2 b/plain2 new file mode 100644 @@ -0,0 +1,1 @@ +1 - record change 2/2 to 'plain2'? [Ynesfdaq?] y + record change 2/2 to 'plain2'? + (enter ? for help) [Ynesfdaq?] y Modify beginning, trim end, record both, add another file to test changes numbering @@ -493,7 +508,8 @@ 2 3 4 - record change 1/3 to 'plain'? [Ynesfdaq?] y + record change 1/3 to 'plain'? + (enter ? for help) [Ynesfdaq?] y @@ -8,5 +8,3 @@ 7 8 @@ -501,14 +517,16 @@ 10 -11 -7264f99c5f5ff3261504828afa4fb4d406c3af54 - record change 2/3 to 'plain'? [Ynesfdaq?] y + record change 2/3 to 'plain'? + (enter ? for help) [Ynesfdaq?] y diff --git a/plain2 b/plain2 1 hunks, 1 lines changed @@ -1,1 +1,2 @@ 1 +2 - record change 3/3 to 'plain2'? [Ynesfdaq?] y + record change 3/3 to 'plain2'? + (enter ? for help) [Ynesfdaq?] y $ hg tip -p @@ -566,7 +584,8 @@ 7 8 9 - record change 1/2 to 'plain'? [Ynesfdaq?] n + record change 1/2 to 'plain'? + (enter ? for help) [Ynesfdaq?] n @@ -4,7 +1,7 @@ 4 @@ -577,7 +596,8 @@ 9 -10 +10.new - record change 2/2 to 'plain'? [Ynesfdaq?] y + record change 2/2 to 'plain'? + (enter ? for help) [Ynesfdaq?] y $ hg tip -p @@ -613,7 +633,8 @@ 4 5 6 - record this change to 'plain'? [Ynesfdaq?] y + record this change to 'plain'? + (enter ? for help) [Ynesfdaq?] y $ hg tip -p @@ -660,7 +681,8 @@ 7 8 9 - record change 1/2 to 'plain'? [Ynesfdaq?] n + record change 1/2 to 'plain'? + (enter ? for help) [Ynesfdaq?] n @@ -1,7 +4,6 @@ 4 @@ -670,7 +692,8 @@ 8 9 -10.new - record change 2/2 to 'plain'? [Ynesfdaq?] y + record change 2/2 to 'plain'? + (enter ? for help) [Ynesfdaq?] y Add to beginning, middle, end @@ -695,7 +718,8 @@ +3 4 5 - record change 1/3 to 'plain'? [Ynesfdaq?] y + record change 1/3 to 'plain'? + (enter ? for help) [Ynesfdaq?] y @@ -1,6 +4,8 @@ 4 @@ -706,7 +730,8 @@ 7 8 9 - record change 2/3 to 'plain'? [Ynesfdaq?] y + record change 2/3 to 'plain'? + (enter ? for help) [Ynesfdaq?] y @@ -3,4 +8,6 @@ 6 @@ -715,7 +740,8 @@ 9 +10 +11 - record change 3/3 to 'plain'? [Ynesfdaq?] n + record change 3/3 to 'plain'? + (enter ? for help) [Ynesfdaq?] n $ hg tip -p @@ -755,7 +781,8 @@ 9 +10 +11 - record this change to 'plain'? [Ynesfdaq?] y + record this change to 'plain'? + (enter ? for help) [Ynesfdaq?] y $ hg tip -p @@ -786,11 +813,13 @@ adding subdir/a diff --git a/subdir/a b/subdir/a new file mode 100644 - examine changes to 'subdir/a'? [Ynesfdaq?] y + examine changes to 'subdir/a'? + (enter ? for help) [Ynesfdaq?] y @@ -0,0 +1,1 @@ +a - record this change to 'subdir/a'? [Ynesfdaq?] y + record this change to 'subdir/a'? + (enter ? for help) [Ynesfdaq?] y $ cd subdir @@ -804,7 +833,8 @@ @@ -1,1 +1,2 @@ a +a - record this change to 'subdir/a'? [Ynesfdaq?] y + record this change to 'subdir/a'? + (enter ? for help) [Ynesfdaq?] y $ hg tip -p @@ -839,7 +869,8 @@ > EOF diff --git a/subdir/f1 b/subdir/f1 1 hunks, 1 lines changed - examine changes to 'subdir/f1'? [Ynesfdaq?] ? + examine changes to 'subdir/f1'? + (enter ? for help) [Ynesfdaq?] ? y - yes, record this change n - no, skip this change @@ -850,7 +881,8 @@ a - record all changes to all remaining files q - quit, recording no changes ? - ? (display help) - examine changes to 'subdir/f1'? [Ynesfdaq?] q + examine changes to 'subdir/f1'? + (enter ? for help) [Ynesfdaq?] q abort: user quit [255] @@ -865,21 +897,25 @@ > EOF diff --git a/subdir/f1 b/subdir/f1 1 hunks, 1 lines changed - examine changes to 'subdir/f1'? [Ynesfdaq?] y + examine changes to 'subdir/f1'? + (enter ? for help) [Ynesfdaq?] y @@ -1,1 +1,2 @@ a +a - record change 1/2 to 'subdir/f1'? [Ynesfdaq?] n + record change 1/2 to 'subdir/f1'? + (enter ? for help) [Ynesfdaq?] n diff --git a/subdir/f2 b/subdir/f2 1 hunks, 1 lines changed - examine changes to 'subdir/f2'? [Ynesfdaq?] y + examine changes to 'subdir/f2'? + (enter ? for help) [Ynesfdaq?] y @@ -1,1 +1,2 @@ b +b - record change 2/2 to 'subdir/f2'? [Ynesfdaq?] n + record change 2/2 to 'subdir/f2'? + (enter ? for help) [Ynesfdaq?] n no changes to record [1] @@ -936,11 +972,13 @@ > EOF diff --git a/subdir/f1 b/subdir/f1 1 hunks, 1 lines changed - examine changes to 'subdir/f1'? [Ynesfdaq?] s + examine changes to 'subdir/f1'? + (enter ? for help) [Ynesfdaq?] s diff --git a/subdir/f2 b/subdir/f2 1 hunks, 1 lines changed - examine changes to 'subdir/f2'? [Ynesfdaq?] abort: response expected + examine changes to 'subdir/f2'? + (enter ? for help) [Ynesfdaq?] abort: response expected [255] No @@ -950,11 +988,13 @@ > EOF diff --git a/subdir/f1 b/subdir/f1 1 hunks, 1 lines changed - examine changes to 'subdir/f1'? [Ynesfdaq?] n + examine changes to 'subdir/f1'? + (enter ? for help) [Ynesfdaq?] n diff --git a/subdir/f2 b/subdir/f2 1 hunks, 1 lines changed - examine changes to 'subdir/f2'? [Ynesfdaq?] abort: response expected + examine changes to 'subdir/f2'? + (enter ? for help) [Ynesfdaq?] abort: response expected [255] f, quit @@ -965,11 +1005,13 @@ > EOF diff --git a/subdir/f1 b/subdir/f1 1 hunks, 1 lines changed - examine changes to 'subdir/f1'? [Ynesfdaq?] f + examine changes to 'subdir/f1'? + (enter ? for help) [Ynesfdaq?] f diff --git a/subdir/f2 b/subdir/f2 1 hunks, 1 lines changed - examine changes to 'subdir/f2'? [Ynesfdaq?] q + examine changes to 'subdir/f2'? + (enter ? for help) [Ynesfdaq?] q abort: user quit [255] @@ -982,11 +1024,13 @@ > EOF diff --git a/subdir/f1 b/subdir/f1 1 hunks, 1 lines changed - examine changes to 'subdir/f1'? [Ynesfdaq?] s + examine changes to 'subdir/f1'? + (enter ? for help) [Ynesfdaq?] s diff --git a/subdir/f2 b/subdir/f2 1 hunks, 1 lines changed - examine changes to 'subdir/f2'? [Ynesfdaq?] a + examine changes to 'subdir/f2'? + (enter ? for help) [Ynesfdaq?] a $ hg tip -p @@ -1011,7 +1055,8 @@ > EOF diff --git a/subdir/f1 b/subdir/f1 1 hunks, 1 lines changed - examine changes to 'subdir/f1'? [Ynesfdaq?] f + examine changes to 'subdir/f1'? + (enter ? for help) [Ynesfdaq?] f $ hg tip -p @@ -1044,13 +1089,15 @@ old mode 100644 new mode 100755 1 hunks, 1 lines changed - examine changes to 'subdir/f1'? [Ynesfdaq?] y + examine changes to 'subdir/f1'? + (enter ? for help) [Ynesfdaq?] y @@ -1,2 +1,3 @@ a a +a - record this change to 'subdir/f1'? [Ynesfdaq?] y + record this change to 'subdir/f1'? + (enter ? for help) [Ynesfdaq?] y $ hg tip --config diff.git=True -p @@ -1081,14 +1128,16 @@ > EOF diff --git a/subdir/f1 b/subdir/f1 1 hunks, 1 lines changed - examine changes to 'subdir/f1'? [Ynesfdaq?] y + examine changes to 'subdir/f1'? + (enter ? for help) [Ynesfdaq?] y @@ -1,3 +1,4 @@ a a a +b - record this change to 'subdir/f1'? [Ynesfdaq?] y + record this change to 'subdir/f1'? + (enter ? for help) [Ynesfdaq?] y $ hg tip --config diff.git=True -p @@ -1121,14 +1170,16 @@ old mode 100755 new mode 100644 1 hunks, 1 lines changed - examine changes to 'subdir/f1'? [Ynesfdaq?] y + examine changes to 'subdir/f1'? + (enter ? for help) [Ynesfdaq?] y @@ -2,3 +2,4 @@ a a a b +c - record this change to 'subdir/f1'? [Ynesfdaq?] y + record this change to 'subdir/f1'? + (enter ? for help) [Ynesfdaq?] y $ hg tip --config diff.git=True -p @@ -1323,7 +1374,8 @@ > EOF diff --git a/editedfile b/editedfile 1 hunks, 2 lines changed - examine changes to 'editedfile'? [Ynesfdaq?] y + examine changes to 'editedfile'? + (enter ? for help) [Ynesfdaq?] y @@ -1,3 +1,3 @@ -This is the first line @@ -1331,7 +1383,8 @@ +This line has changed +This change will be committed This is the third line - record this change to 'editedfile'? [Ynesfdaq?] e + record this change to 'editedfile'? + (enter ? for help) [Ynesfdaq?] e $ cat editedfile This line has changed @@ -1352,10 +1405,12 @@ > EOF diff --git a/editedfile b/editedfile 1 hunks, 1 lines changed - examine changes to 'editedfile'? [Ynesfdaq?] e + examine changes to 'editedfile'? + (enter ? for help) [Ynesfdaq?] e cannot edit patch for whole file - examine changes to 'editedfile'? [Ynesfdaq?] q + examine changes to 'editedfile'? + (enter ? for help) [Ynesfdaq?] q abort: user quit [255] @@ -1376,7 +1431,8 @@ > EOF diff --git a/editedfile b/editedfile 1 hunks, 3 lines changed - examine changes to 'editedfile'? [Ynesfdaq?] y + examine changes to 'editedfile'? + (enter ? for help) [Ynesfdaq?] y @@ -1,3 +1,3 @@ -This is the first line @@ -1385,7 +1441,8 @@ +This change will not be committed +This is the second line +This line has been added - record this change to 'editedfile'? [Ynesfdaq?] e + record this change to 'editedfile'? + (enter ? for help) [Ynesfdaq?] e no changes to record [1] @@ -1414,7 +1471,8 @@ > EOF diff --git a/editedfile b/editedfile 1 hunks, 3 lines changed - examine changes to 'editedfile'? [Ynesfdaq?] y + examine changes to 'editedfile'? + (enter ? for help) [Ynesfdaq?] y @@ -1,3 +1,3 @@ -This is the first line @@ -1423,7 +1481,8 @@ +This change will not be committed +This is the second line +This line has been added - record this change to 'editedfile'? [Ynesfdaq?] e + record this change to 'editedfile'? + (enter ? for help) [Ynesfdaq?] e patching file editedfile Hunk #1 FAILED at 0 @@ -1461,7 +1520,8 @@ > EOF diff --git a/editedfile b/editedfile 1 hunks, 3 lines changed - examine changes to 'editedfile'? [Ynesfdaq?] y + examine changes to 'editedfile'? + (enter ? for help) [Ynesfdaq?] y @@ -1,3 +1,3 @@ -This is the first line @@ -1470,7 +1530,8 @@ +This change will not be committed +This is the second line +This line has been added - record this change to 'editedfile'? [Ynesfdaq?] e + record this change to 'editedfile'? + (enter ? for help) [Ynesfdaq?] e abort: error parsing patch: unhandled transition: range -> range [255] @@ -1485,7 +1546,8 @@ > EOF diff --git a/editedfile b/editedfile 1 hunks, 3 lines changed - examine changes to 'editedfile'? [Ynesfdaq?] y + examine changes to 'editedfile'? + (enter ? for help) [Ynesfdaq?] y @@ -1,3 +1,3 @@ -This is the first line @@ -1494,10 +1556,12 @@ +This change will not be committed +This is the second line +This line has been added - record this change to 'editedfile'? [Ynesfdaq?] e + record this change to 'editedfile'? + (enter ? for help) [Ynesfdaq?] e editor exited with exit code 1 - record this change to 'editedfile'? [Ynesfdaq?] n + record this change to 'editedfile'? + (enter ? for help) [Ynesfdaq?] n no changes to record [1] @@ -1516,7 +1580,8 @@ > EOF diff --git a/editedfile b/editedfile 1 hunks, 3 lines changed - examine changes to 'editedfile'? [Ynesfdaq?] y + examine changes to 'editedfile'? + (enter ? for help) [Ynesfdaq?] y @@ -1,3 +1,3 @@ -This is the first line @@ -1525,7 +1590,8 @@ +This change will not be committed +This is the second line +This line has been added - record this change to 'editedfile'? [Ynesfdaq?] e + record this change to 'editedfile'? + (enter ? for help) [Ynesfdaq?] e abort: error parsing patch: unhandled transition: file -> other [255] @@ -1556,14 +1622,16 @@ > EOF diff --git a/subdir/f1 b/subdir/f1 1 hunks, 1 lines changed - examine changes to 'subdir/f1'? [Ynesfdaq?] y + examine changes to 'subdir/f1'? + (enter ? for help) [Ynesfdaq?] y @@ -3,3 +3,4 @@ a a b c +d - record this change to 'subdir/f1'? [Ynesfdaq?] y + record this change to 'subdir/f1'? + (enter ? for help) [Ynesfdaq?] y $ hg status -A subdir/f1 @@ -1595,14 +1663,16 @@ > EOF diff --git a/subdir/f1 b/subdir/f1 1 hunks, 1 lines changed - examine changes to 'subdir/f1'? [Ynesfdaq?] y + examine changes to 'subdir/f1'? + (enter ? for help) [Ynesfdaq?] y @@ -4,3 +4,4 @@ a b c d +e - record this change to 'subdir/f1'? [Ynesfdaq?] y + record this change to 'subdir/f1'? + (enter ? for help) [Ynesfdaq?] y $ hg status -A subdir/f1 C subdir/f1 @@ -1626,14 +1696,16 @@ rename from plain rename to plain3 1 hunks, 1 lines changed - examine changes to 'plain' and 'plain3'? [Ynesfdaq?] y + examine changes to 'plain' and 'plain3'? + (enter ? for help) [Ynesfdaq?] y @@ -11,3 +11,4 @@ 8 9 10 11 +somechange - record this change to 'plain3'? [Ynesfdaq?] y + record this change to 'plain3'? + (enter ? for help) [Ynesfdaq?] y The #if execbit block above changes the hash here on some systems $ hg status -A plain3 @@ -1665,13 +1737,15 @@ > EOF diff --git a/newfile b/newfile new file mode 100644 - examine changes to 'newfile'? [Ynesfdaq?] y + examine changes to 'newfile'? + (enter ? for help) [Ynesfdaq?] y @@ -0,0 +1,3 @@ +This is the first line +This is the second line +This is the third line - record this change to 'newfile'? [Ynesfdaq?] e + record this change to 'newfile'? + (enter ? for help) [Ynesfdaq?] e $ hg cat -r tip newfile This is the very line @@ -1696,11 +1770,13 @@ > EOF diff --git a/folder/bar b/folder/bar new file mode 100644 - examine changes to 'folder/bar'? [Ynesfdaq?] y + examine changes to 'folder/bar'? + (enter ? for help) [Ynesfdaq?] y @@ -0,0 +1,1 @@ +foo - record this change to 'folder/bar'? [Ynesfdaq?] y + record this change to 'folder/bar'? + (enter ? for help) [Ynesfdaq?] y The #if execbit block above changes the hashes here on some systems $ hg tip -p @@ -1781,7 +1857,8 @@ > EOF diff --git a/subdir/f1 b/subdir/f1 2 hunks, 2 lines changed - examine changes to 'subdir/f1'? [Ynesfdaq?] y + examine changes to 'subdir/f1'? + (enter ? for help) [Ynesfdaq?] y @@ -1,6 +1,6 @@ -a @@ -1791,7 +1868,8 @@ b c d - record change 1/2 to 'subdir/f1'? [Ynesfdaq?] y + record change 1/2 to 'subdir/f1'? + (enter ? for help) [Ynesfdaq?] y @@ -2,6 +2,6 @@ a @@ -1801,7 +1879,8 @@ d -e +E - record change 2/2 to 'subdir/f1'? [Ynesfdaq?] n + record change 2/2 to 'subdir/f1'? + (enter ? for help) [Ynesfdaq?] n $ cat >> .hg/hgrc <<EOF > [extensions] @@ -1837,15 +1916,18 @@ $ printf 'y\ny\ny\n' | hg ci -im initial --config commands.commit.interactive.unified=0 diff --git a/foo b/foo 2 hunks, 2 lines changed - examine changes to 'foo'? [Ynesfdaq?] y + examine changes to 'foo'? + (enter ? for help) [Ynesfdaq?] y @@ -1,0 +2,1 @@ 1 +change1 - record change 1/2 to 'foo'? [Ynesfdaq?] y + record change 1/2 to 'foo'? + (enter ? for help) [Ynesfdaq?] y @@ -3,0 +5,1 @@ 3 +change2 - record change 2/2 to 'foo'? [Ynesfdaq?] y + record change 2/2 to 'foo'? + (enter ? for help) [Ynesfdaq?] y $ cd $TESTTMP @@ -1873,14 +1955,16 @@ $ printf 'y\ny\ny\n' | hg ci -im initial --config diff.ignoreblanklines=1 diff --git a/foo b/foo 2 hunks, 2 lines changed - examine changes to 'foo'? [Ynesfdaq?] y + examine changes to 'foo'? + (enter ? for help) [Ynesfdaq?] y @@ -1,3 +1,4 @@ 1 + 2 3 - record change 1/2 to 'foo'? [Ynesfdaq?] y + record change 1/2 to 'foo'? + (enter ? for help) [Ynesfdaq?] y @@ -2,4 +3,5 @@ 2 @@ -1888,6 +1972,7 @@ +change2 4 5 - record change 2/2 to 'foo'? [Ynesfdaq?] y + record change 2/2 to 'foo'? + (enter ? for help) [Ynesfdaq?] y