Mercurial > hg
comparison tests/test-split.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 | f8c5225b9054 |
children | 1fd530b1e1cf |
comparison
equal
deleted
inserted
replaced
42565:4764e8436b2a | 42566:f802a75da585 |
---|---|
133 > } | 133 > } |
134 | 134 |
135 $ HGEDITOR=false runsplit | 135 $ HGEDITOR=false runsplit |
136 diff --git a/a b/a | 136 diff --git a/a b/a |
137 3 hunks, 3 lines changed | 137 3 hunks, 3 lines changed |
138 examine changes to 'a'? [Ynesfdaq?] y | 138 examine changes to 'a'? |
139 (enter ? for help) [Ynesfdaq?] y | |
139 | 140 |
140 @@ -1,1 +1,1 @@ | 141 @@ -1,1 +1,1 @@ |
141 -1 | 142 -1 |
142 +11 | 143 +11 |
143 record change 1/3 to 'a'? [Ynesfdaq?] n | 144 record change 1/3 to 'a'? |
145 (enter ? for help) [Ynesfdaq?] n | |
144 | 146 |
145 @@ -3,1 +3,1 @@ 2 | 147 @@ -3,1 +3,1 @@ 2 |
146 -3 | 148 -3 |
147 +33 | 149 +33 |
148 record change 2/3 to 'a'? [Ynesfdaq?] n | 150 record change 2/3 to 'a'? |
151 (enter ? for help) [Ynesfdaq?] n | |
149 | 152 |
150 @@ -5,1 +5,1 @@ 4 | 153 @@ -5,1 +5,1 @@ 4 |
151 -5 | 154 -5 |
152 +55 | 155 +55 |
153 record change 3/3 to 'a'? [Ynesfdaq?] y | 156 record change 3/3 to 'a'? |
157 (enter ? for help) [Ynesfdaq?] y | |
154 | 158 |
155 transaction abort! | 159 transaction abort! |
156 rollback completed | 160 rollback completed |
157 abort: edit failed: false exited with status 1 | 161 abort: edit failed: false exited with status 1 |
158 [255] | 162 [255] |
160 | 164 |
161 $ HGEDITOR="\"$PYTHON\" $TESTTMP/editor.py" | 165 $ HGEDITOR="\"$PYTHON\" $TESTTMP/editor.py" |
162 $ runsplit | 166 $ runsplit |
163 diff --git a/a b/a | 167 diff --git a/a b/a |
164 3 hunks, 3 lines changed | 168 3 hunks, 3 lines changed |
165 examine changes to 'a'? [Ynesfdaq?] y | 169 examine changes to 'a'? |
170 (enter ? for help) [Ynesfdaq?] y | |
166 | 171 |
167 @@ -1,1 +1,1 @@ | 172 @@ -1,1 +1,1 @@ |
168 -1 | 173 -1 |
169 +11 | 174 +11 |
170 record change 1/3 to 'a'? [Ynesfdaq?] n | 175 record change 1/3 to 'a'? |
176 (enter ? for help) [Ynesfdaq?] n | |
171 | 177 |
172 @@ -3,1 +3,1 @@ 2 | 178 @@ -3,1 +3,1 @@ 2 |
173 -3 | 179 -3 |
174 +33 | 180 +33 |
175 record change 2/3 to 'a'? [Ynesfdaq?] n | 181 record change 2/3 to 'a'? |
182 (enter ? for help) [Ynesfdaq?] n | |
176 | 183 |
177 @@ -5,1 +5,1 @@ 4 | 184 @@ -5,1 +5,1 @@ 4 |
178 -5 | 185 -5 |
179 +55 | 186 +55 |
180 record change 3/3 to 'a'? [Ynesfdaq?] y | 187 record change 3/3 to 'a'? |
188 (enter ? for help) [Ynesfdaq?] y | |
181 | 189 |
182 EDITOR: HG: Splitting 1df0d5c5a3ab. Write commit message for the first split changeset. | 190 EDITOR: HG: Splitting 1df0d5c5a3ab. Write commit message for the first split changeset. |
183 EDITOR: a2 | 191 EDITOR: a2 |
184 EDITOR: | 192 EDITOR: |
185 EDITOR: | 193 EDITOR: |
190 EDITOR: HG: branch 'default' | 198 EDITOR: HG: branch 'default' |
191 EDITOR: HG: changed a | 199 EDITOR: HG: changed a |
192 created new head | 200 created new head |
193 diff --git a/a b/a | 201 diff --git a/a b/a |
194 2 hunks, 2 lines changed | 202 2 hunks, 2 lines changed |
195 examine changes to 'a'? [Ynesfdaq?] y | 203 examine changes to 'a'? |
204 (enter ? for help) [Ynesfdaq?] y | |
196 | 205 |
197 @@ -1,1 +1,1 @@ | 206 @@ -1,1 +1,1 @@ |
198 -1 | 207 -1 |
199 +11 | 208 +11 |
200 record change 1/2 to 'a'? [Ynesfdaq?] n | 209 record change 1/2 to 'a'? |
210 (enter ? for help) [Ynesfdaq?] n | |
201 | 211 |
202 @@ -3,1 +3,1 @@ 2 | 212 @@ -3,1 +3,1 @@ 2 |
203 -3 | 213 -3 |
204 +33 | 214 +33 |
205 record change 2/2 to 'a'? [Ynesfdaq?] y | 215 record change 2/2 to 'a'? |
216 (enter ? for help) [Ynesfdaq?] y | |
206 | 217 |
207 EDITOR: HG: Splitting 1df0d5c5a3ab. So far it has been split into: | 218 EDITOR: HG: Splitting 1df0d5c5a3ab. So far it has been split into: |
208 EDITOR: HG: - e704349bd21b: split 1 | 219 EDITOR: HG: - e704349bd21b: split 1 |
209 EDITOR: HG: Write commit message for the next split changeset. | 220 EDITOR: HG: Write commit message for the next split changeset. |
210 EDITOR: a2 | 221 EDITOR: a2 |
216 EDITOR: HG: user: test | 227 EDITOR: HG: user: test |
217 EDITOR: HG: branch 'default' | 228 EDITOR: HG: branch 'default' |
218 EDITOR: HG: changed a | 229 EDITOR: HG: changed a |
219 diff --git a/a b/a | 230 diff --git a/a b/a |
220 1 hunks, 1 lines changed | 231 1 hunks, 1 lines changed |
221 examine changes to 'a'? [Ynesfdaq?] y | 232 examine changes to 'a'? |
233 (enter ? for help) [Ynesfdaq?] y | |
222 | 234 |
223 @@ -1,1 +1,1 @@ | 235 @@ -1,1 +1,1 @@ |
224 -1 | 236 -1 |
225 +11 | 237 +11 |
226 record this change to 'a'? [Ynesfdaq?] y | 238 record this change to 'a'? |
239 (enter ? for help) [Ynesfdaq?] y | |
227 | 240 |
228 EDITOR: HG: Splitting 1df0d5c5a3ab. So far it has been split into: | 241 EDITOR: HG: Splitting 1df0d5c5a3ab. So far it has been split into: |
229 EDITOR: HG: - e704349bd21b: split 1 | 242 EDITOR: HG: - e704349bd21b: split 1 |
230 EDITOR: HG: - a09ad58faae3: split 2 | 243 EDITOR: HG: - a09ad58faae3: split 2 |
231 EDITOR: HG: Write commit message for the next split changeset. | 244 EDITOR: HG: Write commit message for the next split changeset. |
513 > y | 526 > y |
514 > y | 527 > y |
515 > EOF | 528 > EOF |
516 diff --git a/B b/B | 529 diff --git a/B b/B |
517 new file mode 100644 | 530 new file mode 100644 |
518 examine changes to 'B'? [Ynesfdaq?] y | 531 examine changes to 'B'? |
532 (enter ? for help) [Ynesfdaq?] y | |
519 | 533 |
520 @@ -0,0 +1,1 @@ | 534 @@ -0,0 +1,1 @@ |
521 +B | 535 +B |
522 \ No newline at end of file | 536 \ No newline at end of file |
523 record this change to 'B'? [Ynesfdaq?] y | 537 record this change to 'B'? |
538 (enter ? for help) [Ynesfdaq?] y | |
524 | 539 |
525 EDITOR: HG: Splitting 112478962961. Write commit message for the first split changeset. | 540 EDITOR: HG: Splitting 112478962961. Write commit message for the first split changeset. |
526 EDITOR: B | 541 EDITOR: B |
527 EDITOR: | 542 EDITOR: |
528 EDITOR: | 543 EDITOR: |
619 > split 2 | 634 > split 2 |
620 > EOF | 635 > EOF |
621 $ printf 'f\nn\nf\n' | hg --config extensions.split= --config diff.ignoreblanklines=1 split | 636 $ printf 'f\nn\nf\n' | hg --config extensions.split= --config diff.ignoreblanklines=1 split |
622 diff --git a/bar b/bar | 637 diff --git a/bar b/bar |
623 2 hunks, 2 lines changed | 638 2 hunks, 2 lines changed |
624 examine changes to 'bar'? [Ynesfdaq?] f | 639 examine changes to 'bar'? |
640 (enter ? for help) [Ynesfdaq?] f | |
625 | 641 |
626 diff --git a/foo b/foo | 642 diff --git a/foo b/foo |
627 1 hunks, 1 lines changed | 643 1 hunks, 1 lines changed |
628 examine changes to 'foo'? [Ynesfdaq?] n | 644 examine changes to 'foo'? |
645 (enter ? for help) [Ynesfdaq?] n | |
629 | 646 |
630 EDITOR: HG: Splitting dd3c45017cbf. Write commit message for the first split changeset. | 647 EDITOR: HG: Splitting dd3c45017cbf. Write commit message for the first split changeset. |
631 EDITOR: splitme | 648 EDITOR: splitme |
632 EDITOR: | 649 EDITOR: |
633 EDITOR: | 650 EDITOR: |
638 EDITOR: HG: branch 'default' | 655 EDITOR: HG: branch 'default' |
639 EDITOR: HG: changed bar | 656 EDITOR: HG: changed bar |
640 created new head | 657 created new head |
641 diff --git a/foo b/foo | 658 diff --git a/foo b/foo |
642 1 hunks, 1 lines changed | 659 1 hunks, 1 lines changed |
643 examine changes to 'foo'? [Ynesfdaq?] f | 660 examine changes to 'foo'? |
661 (enter ? for help) [Ynesfdaq?] f | |
644 | 662 |
645 EDITOR: HG: Splitting dd3c45017cbf. So far it has been split into: | 663 EDITOR: HG: Splitting dd3c45017cbf. So far it has been split into: |
646 EDITOR: HG: - f205aea1c624: split 1 | 664 EDITOR: HG: - f205aea1c624: split 1 |
647 EDITOR: HG: Write commit message for the next split changeset. | 665 EDITOR: HG: Write commit message for the next split changeset. |
648 EDITOR: splitme | 666 EDITOR: splitme |
673 > split 2 | 691 > split 2 |
674 > EOF | 692 > EOF |
675 $ printf 'f\nn\nf\n' | hg --config extensions.split= --config diff.ignoreblanklines=1 split | 693 $ printf 'f\nn\nf\n' | hg --config extensions.split= --config diff.ignoreblanklines=1 split |
676 diff --git a/bar b/bar | 694 diff --git a/bar b/bar |
677 1 hunks, 1 lines changed | 695 1 hunks, 1 lines changed |
678 examine changes to 'bar'? [Ynesfdaq?] f | 696 examine changes to 'bar'? |
697 (enter ? for help) [Ynesfdaq?] f | |
679 | 698 |
680 diff --git a/foo b/foo | 699 diff --git a/foo b/foo |
681 2 hunks, 2 lines changed | 700 2 hunks, 2 lines changed |
682 examine changes to 'foo'? [Ynesfdaq?] n | 701 examine changes to 'foo'? |
702 (enter ? for help) [Ynesfdaq?] n | |
683 | 703 |
684 EDITOR: HG: Splitting 904c80b40a4a. Write commit message for the first split changeset. | 704 EDITOR: HG: Splitting 904c80b40a4a. Write commit message for the first split changeset. |
685 EDITOR: splitme | 705 EDITOR: splitme |
686 EDITOR: | 706 EDITOR: |
687 EDITOR: | 707 EDITOR: |
692 EDITOR: HG: branch 'default' | 712 EDITOR: HG: branch 'default' |
693 EDITOR: HG: changed bar | 713 EDITOR: HG: changed bar |
694 created new head | 714 created new head |
695 diff --git a/foo b/foo | 715 diff --git a/foo b/foo |
696 2 hunks, 2 lines changed | 716 2 hunks, 2 lines changed |
697 examine changes to 'foo'? [Ynesfdaq?] f | 717 examine changes to 'foo'? |
718 (enter ? for help) [Ynesfdaq?] f | |
698 | 719 |
699 EDITOR: HG: Splitting 904c80b40a4a. So far it has been split into: | 720 EDITOR: HG: Splitting 904c80b40a4a. So far it has been split into: |
700 EDITOR: HG: - ffecf40fa954: split 1 | 721 EDITOR: HG: - ffecf40fa954: split 1 |
701 EDITOR: HG: Write commit message for the next split changeset. | 722 EDITOR: HG: Write commit message for the next split changeset. |
702 EDITOR: splitme | 723 EDITOR: splitme |
737 > EOF | 758 > EOF |
738 $ printf 'y\n' | hg split | 759 $ printf 'y\n' | hg split |
739 diff --git a/foo b/foo | 760 diff --git a/foo b/foo |
740 old mode 100644 | 761 old mode 100644 |
741 new mode 100755 | 762 new mode 100755 |
742 examine changes to 'foo'? [Ynesfdaq?] y | 763 examine changes to 'foo'? |
764 (enter ? for help) [Ynesfdaq?] y | |
743 | 765 |
744 EDITOR: HG: Splitting 3a2125f0f4cb. Write commit message for the first split changeset. | 766 EDITOR: HG: Splitting 3a2125f0f4cb. Write commit message for the first split changeset. |
745 EDITOR: make executable | 767 EDITOR: make executable |
746 EDITOR: | 768 EDITOR: |
747 EDITOR: | 769 EDITOR: |