diff tests/test-merge-changedelete.t @ 42565:4764e8436b2a

filemerge: make last line of prompts <40 english chars (issue6158) I've chosen <40 as the target so that other languages that may have a 2x blowup in character count can still have a chance to fit into an 80 column screen. Previously, we would show a prompt like: ``` keep (l)ocal [dest], take (o)ther [source], or leave (u)nresolved for some/potentially/really/long/path? ``` On at least some systems, if readline was in use then the last line of the prompt would be wrapped strangely if it couldn't fit entirely on one line. This strange wrapping may be just a carriage return without a line feed, overwriting the beginning of the line; example (100 columns wide, 65 character filename, and yes there's 10 spaces on the end, I assume this is to handle the user inputting longest word we provide as an option, "unresolved"): ``` ng/dir/name/that/does/not/work/well/with/readline/file.txt? ave (u)nresolved for some/lon ``` In some cases it may partially wrap onto the next line, but still be missing earlier parts in the line, such as below (60 columns wide, 65 character filename): ``` rev], or leave (u)nresolved for some/long/dir/name/that/do s/not/work/well/with/readline/file.txt? ``` With this fix, this looks like this on a 60 column screen: ``` tool vim_with_markers (for pattern some/long/dir/name/that/d oes/not/work/well/with/readline/file.txt) can't handle binar y tool meld can't handle binary tool vim_with_markers can't handle binary tool internal:merge3 can't handle binary tool merge can't handle binary no tool found to merge some/long/dir/name/that/does/not/work /well/with/readline/file.txt file 'some/long/dir/name/that/does/not/work/well/with/readli ne/file.txt' needs to be resolved. You can keep (l)ocal [working copy], take (o)ther [merge rev ], or leave (u)nresolved. What do you want to do? ``` Differential Revision: https://phab.mercurial-scm.org/D6562
author Kyle Lippincott <spectral@google.com>
date Thu, 20 Jun 2019 11:40:47 -0700
parents a3fd84f4fb38
children acbfa31cfaf2
line wrap: on
line diff
--- a/tests/test-merge-changedelete.t	Sat Jul 06 19:55:29 2019 -0400
+++ b/tests/test-merge-changedelete.t	Thu Jun 20 11:40:47 2019 -0700
@@ -55,11 +55,11 @@
 
   $ hg merge -y
   file 'file1' was deleted in other [merge rev] but was modified in local [working copy].
-  What do you want to do?
-  use (c)hanged version, (d)elete, or leave (u)nresolved? u
+  You can use (c)hanged version, (d)elete, or leave (u)nresolved.
+  What do you want to do? u
   file 'file2' was deleted in local [working copy] but was modified in other [merge rev].
-  What do you want to do?
-  use (c)hanged version, leave (d)eleted, or leave (u)nresolved? u
+  You can use (c)hanged version, leave (d)eleted, or leave (u)nresolved.
+  What do you want to do? u
   merging file3
   warning: conflicts while merging file3! (edit, then use 'hg resolve --mark')
   0 files updated, 0 files merged, 0 files removed, 3 files unresolved
@@ -124,11 +124,11 @@
   > d
   > EOF
   file 'file1' was deleted in other [merge rev] but was modified in local [working copy].
-  What do you want to do?
-  use (c)hanged version, (d)elete, or leave (u)nresolved? c
+  You can use (c)hanged version, (d)elete, or leave (u)nresolved.
+  What do you want to do? c
   file 'file2' was deleted in local [working copy] but was modified in other [merge rev].
-  What do you want to do?
-  use (c)hanged version, leave (d)eleted, or leave (u)nresolved? d
+  You can use (c)hanged version, leave (d)eleted, or leave (u)nresolved.
+  What do you want to do? d
   merging file3
   warning: conflicts while merging file3! (edit, then use 'hg resolve --mark')
   0 files updated, 2 files merged, 0 files removed, 1 files unresolved
@@ -194,23 +194,23 @@
   > c
   > EOF
   file 'file1' was deleted in other [merge rev] but was modified in local [working copy].
-  What do you want to do?
-  use (c)hanged version, (d)elete, or leave (u)nresolved? foo
+  You can use (c)hanged version, (d)elete, or leave (u)nresolved.
+  What do you want to do? foo
   unrecognized response
   file 'file1' was deleted in other [merge rev] but was modified in local [working copy].
-  What do you want to do?
-  use (c)hanged version, (d)elete, or leave (u)nresolved? bar
+  You can use (c)hanged version, (d)elete, or leave (u)nresolved.
+  What do you want to do? bar
   unrecognized response
   file 'file1' was deleted in other [merge rev] but was modified in local [working copy].
-  What do you want to do?
-  use (c)hanged version, (d)elete, or leave (u)nresolved? d
+  You can use (c)hanged version, (d)elete, or leave (u)nresolved.
+  What do you want to do? d
   file 'file2' was deleted in local [working copy] but was modified in other [merge rev].
-  What do you want to do?
-  use (c)hanged version, leave (d)eleted, or leave (u)nresolved? baz
+  You can use (c)hanged version, leave (d)eleted, or leave (u)nresolved.
+  What do you want to do? baz
   unrecognized response
   file 'file2' was deleted in local [working copy] but was modified in other [merge rev].
-  What do you want to do?
-  use (c)hanged version, leave (d)eleted, or leave (u)nresolved? c
+  You can use (c)hanged version, leave (d)eleted, or leave (u)nresolved.
+  What do you want to do? c
   merging file3
   warning: conflicts while merging file3! (edit, then use 'hg resolve --mark')
   0 files updated, 1 files merged, 1 files removed, 1 files unresolved
@@ -272,11 +272,11 @@
   > d
   > EOF
   file 'file1' was deleted in other [merge rev] but was modified in local [working copy].
-  What do you want to do?
-  use (c)hanged version, (d)elete, or leave (u)nresolved? d
+  You can use (c)hanged version, (d)elete, or leave (u)nresolved.
+  What do you want to do? d
   file 'file2' was deleted in local [working copy] but was modified in other [merge rev].
-  What do you want to do?
-  use (c)hanged version, leave (d)eleted, or leave (u)nresolved? 
+  You can use (c)hanged version, leave (d)eleted, or leave (u)nresolved.
+  What do you want to do? 
   merging file3
   warning: conflicts while merging file3! (edit, then use 'hg resolve --mark')
   0 files updated, 0 files merged, 1 files removed, 2 files unresolved
@@ -485,12 +485,14 @@
 
   $ hg merge --config ui.interactive=True --tool :prompt
   file 'file1' was deleted in other [merge rev] but was modified in local [working copy].
-  What do you want to do?
-  use (c)hanged version, (d)elete, or leave (u)nresolved? 
+  You can use (c)hanged version, (d)elete, or leave (u)nresolved.
+  What do you want to do? 
   file 'file2' was deleted in local [working copy] but was modified in other [merge rev].
-  What do you want to do?
-  use (c)hanged version, leave (d)eleted, or leave (u)nresolved? 
-  keep (l)ocal [working copy], take (o)ther [merge rev], or leave (u)nresolved for file3? 
+  You can use (c)hanged version, leave (d)eleted, or leave (u)nresolved.
+  What do you want to do? 
+  file 'file3' needs to be resolved.
+  You can keep (l)ocal [working copy], take (o)ther [merge rev], or leave (u)nresolved.
+  What do you want to do? 
   0 files updated, 0 files merged, 0 files removed, 3 files unresolved
   use 'hg resolve' to retry unresolved file merges or 'hg merge --abort' to abandon
   [1]
@@ -546,12 +548,14 @@
 
   $ hg merge --tool :prompt
   file 'file1' was deleted in other [merge rev] but was modified in local [working copy].
-  What do you want to do?
-  use (c)hanged version, (d)elete, or leave (u)nresolved? u
+  You can use (c)hanged version, (d)elete, or leave (u)nresolved.
+  What do you want to do? u
   file 'file2' was deleted in local [working copy] but was modified in other [merge rev].
-  What do you want to do?
-  use (c)hanged version, leave (d)eleted, or leave (u)nresolved? u
-  keep (l)ocal [working copy], take (o)ther [merge rev], or leave (u)nresolved for file3? u
+  You can use (c)hanged version, leave (d)eleted, or leave (u)nresolved.
+  What do you want to do? u
+  file 'file3' needs to be resolved.
+  You can keep (l)ocal [working copy], take (o)ther [merge rev], or leave (u)nresolved.
+  What do you want to do? u
   0 files updated, 0 files merged, 0 files removed, 3 files unresolved
   use 'hg resolve' to retry unresolved file merges or 'hg merge --abort' to abandon
   [1]
@@ -605,11 +609,11 @@
 
   $ hg merge --tool :merge3
   file 'file1' was deleted in other [merge rev] but was modified in local [working copy].
-  What do you want to do?
-  use (c)hanged version, (d)elete, or leave (u)nresolved? u
+  You can use (c)hanged version, (d)elete, or leave (u)nresolved.
+  What do you want to do? u
   file 'file2' was deleted in local [working copy] but was modified in other [merge rev].
-  What do you want to do?
-  use (c)hanged version, leave (d)eleted, or leave (u)nresolved? u
+  You can use (c)hanged version, leave (d)eleted, or leave (u)nresolved.
+  What do you want to do? u
   merging file3
   warning: conflicts while merging file3! (edit, then use 'hg resolve --mark')
   0 files updated, 0 files merged, 0 files removed, 3 files unresolved
@@ -697,12 +701,14 @@
   
   === :other -> :prompt ===
   file 'file1' was deleted in other [merge rev] but was modified in local [working copy].
-  What do you want to do?
-  use (c)hanged version, (d)elete, or leave (u)nresolved? 
+  You can use (c)hanged version, (d)elete, or leave (u)nresolved.
+  What do you want to do? 
   file 'file2' was deleted in local [working copy] but was modified in other [merge rev].
-  What do you want to do?
-  use (c)hanged version, leave (d)eleted, or leave (u)nresolved? 
-  keep (l)ocal [working copy], take (o)ther [merge rev], or leave (u)nresolved for file3? 
+  You can use (c)hanged version, leave (d)eleted, or leave (u)nresolved.
+  What do you want to do? 
+  file 'file3' needs to be resolved.
+  You can keep (l)ocal [working copy], take (o)ther [merge rev], or leave (u)nresolved.
+  What do you want to do? 
   --- diff of status ---
   (status identical)
   
@@ -727,12 +733,14 @@
   
   === :local -> :prompt ===
   file 'file1' was deleted in other [merge rev] but was modified in local [working copy].
-  What do you want to do?
-  use (c)hanged version, (d)elete, or leave (u)nresolved? 
+  You can use (c)hanged version, (d)elete, or leave (u)nresolved.
+  What do you want to do? 
   file 'file2' was deleted in local [working copy] but was modified in other [merge rev].
-  What do you want to do?
-  use (c)hanged version, leave (d)eleted, or leave (u)nresolved? 
-  keep (l)ocal [working copy], take (o)ther [merge rev], or leave (u)nresolved for file3? 
+  You can use (c)hanged version, leave (d)eleted, or leave (u)nresolved.
+  What do you want to do? 
+  file 'file3' needs to be resolved.
+  You can keep (l)ocal [working copy], take (o)ther [merge rev], or leave (u)nresolved.
+  What do you want to do? 
   --- diff of status ---
   (status identical)
   
@@ -747,12 +755,14 @@
   
   === :fail -> :prompt ===
   file 'file1' was deleted in other [merge rev] but was modified in local [working copy].
-  What do you want to do?
-  use (c)hanged version, (d)elete, or leave (u)nresolved? 
+  You can use (c)hanged version, (d)elete, or leave (u)nresolved.
+  What do you want to do? 
   file 'file2' was deleted in local [working copy] but was modified in other [merge rev].
-  What do you want to do?
-  use (c)hanged version, leave (d)eleted, or leave (u)nresolved? 
-  keep (l)ocal [working copy], take (o)ther [merge rev], or leave (u)nresolved for file3? 
+  You can use (c)hanged version, leave (d)eleted, or leave (u)nresolved.
+  What do you want to do? 
+  file 'file3' needs to be resolved.
+  You can keep (l)ocal [working copy], take (o)ther [merge rev], or leave (u)nresolved.
+  What do you want to do? 
   --- diff of status ---
   (status identical)
   
@@ -775,11 +785,11 @@
   $ hg rm file2
   $ hg update 1 -y
   file 'file1' was deleted in other [destination] but was modified in local [working copy].
-  What do you want to do?
-  use (c)hanged version, (d)elete, or leave (u)nresolved? u
+  You can use (c)hanged version, (d)elete, or leave (u)nresolved.
+  What do you want to do? u
   file 'file2' was deleted in local [working copy] but was modified in other [destination].
-  What do you want to do?
-  use (c)hanged version, leave (d)eleted, or leave (u)nresolved? u
+  You can use (c)hanged version, leave (d)eleted, or leave (u)nresolved.
+  What do you want to do? u
   1 files updated, 0 files merged, 0 files removed, 2 files unresolved
   use 'hg resolve' to retry unresolved file merges
   [1]
@@ -953,11 +963,11 @@
   $ hg rm file2
   $ hg update 1 --config ui.interactive=True --tool :prompt
   file 'file1' was deleted in other [destination] but was modified in local [working copy].
-  What do you want to do?
-  use (c)hanged version, (d)elete, or leave (u)nresolved? 
+  You can use (c)hanged version, (d)elete, or leave (u)nresolved.
+  What do you want to do? 
   file 'file2' was deleted in local [working copy] but was modified in other [destination].
-  What do you want to do?
-  use (c)hanged version, leave (d)eleted, or leave (u)nresolved? 
+  You can use (c)hanged version, leave (d)eleted, or leave (u)nresolved.
+  What do you want to do? 
   1 files updated, 0 files merged, 0 files removed, 2 files unresolved
   use 'hg resolve' to retry unresolved file merges
   [1]
@@ -1005,11 +1015,11 @@
   $ hg rm file2
   $ hg update 1 --tool :merge3
   file 'file1' was deleted in other [destination] but was modified in local [working copy].
-  What do you want to do?
-  use (c)hanged version, (d)elete, or leave (u)nresolved? u
+  You can use (c)hanged version, (d)elete, or leave (u)nresolved.
+  What do you want to do? u
   file 'file2' was deleted in local [working copy] but was modified in other [destination].
-  What do you want to do?
-  use (c)hanged version, leave (d)eleted, or leave (u)nresolved? u
+  You can use (c)hanged version, leave (d)eleted, or leave (u)nresolved.
+  What do you want to do? u
   1 files updated, 0 files merged, 0 files removed, 2 files unresolved
   use 'hg resolve' to retry unresolved file merges
   [1]
@@ -1063,11 +1073,11 @@
   
   === :other -> :prompt ===
   file 'file1' was deleted in other [destination] but was modified in local [working copy].
-  What do you want to do?
-  use (c)hanged version, (d)elete, or leave (u)nresolved? 
+  You can use (c)hanged version, (d)elete, or leave (u)nresolved.
+  What do you want to do? 
   file 'file2' was deleted in local [working copy] but was modified in other [destination].
-  What do you want to do?
-  use (c)hanged version, leave (d)eleted, or leave (u)nresolved? 
+  You can use (c)hanged version, leave (d)eleted, or leave (u)nresolved.
+  What do you want to do? 
   --- diff of status ---
   (status identical)
   
@@ -1092,11 +1102,11 @@
   
   === :local -> :prompt ===
   file 'file1' was deleted in other [destination] but was modified in local [working copy].
-  What do you want to do?
-  use (c)hanged version, (d)elete, or leave (u)nresolved? 
+  You can use (c)hanged version, (d)elete, or leave (u)nresolved.
+  What do you want to do? 
   file 'file2' was deleted in local [working copy] but was modified in other [destination].
-  What do you want to do?
-  use (c)hanged version, leave (d)eleted, or leave (u)nresolved? 
+  You can use (c)hanged version, leave (d)eleted, or leave (u)nresolved.
+  What do you want to do? 
   --- diff of status ---
   (status identical)
   
@@ -1111,11 +1121,11 @@
   
   === :fail -> :prompt ===
   file 'file1' was deleted in other [destination] but was modified in local [working copy].
-  What do you want to do?
-  use (c)hanged version, (d)elete, or leave (u)nresolved? 
+  You can use (c)hanged version, (d)elete, or leave (u)nresolved.
+  What do you want to do? 
   file 'file2' was deleted in local [working copy] but was modified in other [destination].
-  What do you want to do?
-  use (c)hanged version, leave (d)eleted, or leave (u)nresolved? 
+  You can use (c)hanged version, leave (d)eleted, or leave (u)nresolved.
+  What do you want to do? 
   --- diff of status ---
   (status identical)