Mercurial > hg
comparison tests/test-copytrace-heuristics.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 | 3de4f17f4824 |
children | 5c2a4f37eace |
comparison
equal
deleted
inserted
replaced
42561:44e99811bea7 | 42565:4764e8436b2a |
---|---|
87 desc: initial | 87 desc: initial |
88 | 88 |
89 $ hg rebase -s . -d 1 | 89 $ hg rebase -s . -d 1 |
90 rebasing 2:d526312210b9 "mode a" (tip) | 90 rebasing 2:d526312210b9 "mode a" (tip) |
91 file 'a' was deleted in local [dest] but was modified in other [source]. | 91 file 'a' was deleted in local [dest] but was modified in other [source]. |
92 What do you want to do? | 92 You can use (c)hanged version, leave (d)eleted, or leave (u)nresolved. |
93 use (c)hanged version, leave (d)eleted, or leave (u)nresolved? u | 93 What do you want to do? u |
94 unresolved conflicts (see hg resolve, then hg rebase --continue) | 94 unresolved conflicts (see hg resolve, then hg rebase --continue) |
95 [1] | 95 [1] |
96 | 96 |
97 $ cd .. | 97 $ cd .. |
98 $ rm -rf repo | 98 $ rm -rf repo |
244 | 244 |
245 $ hg rebase -s 2 -d 1 --config experimental.copytrace.movecandidateslimit=0 | 245 $ hg rebase -s 2 -d 1 --config experimental.copytrace.movecandidateslimit=0 |
246 rebasing 2:ef716627c70b "mod a" (tip) | 246 rebasing 2:ef716627c70b "mod a" (tip) |
247 skipping copytracing for 'a', more candidates than the limit: 7 | 247 skipping copytracing for 'a', more candidates than the limit: 7 |
248 file 'a' was deleted in local [dest] but was modified in other [source]. | 248 file 'a' was deleted in local [dest] but was modified in other [source]. |
249 What do you want to do? | 249 You can use (c)hanged version, leave (d)eleted, or leave (u)nresolved. |
250 use (c)hanged version, leave (d)eleted, or leave (u)nresolved? u | 250 What do you want to do? u |
251 unresolved conflicts (see hg resolve, then hg rebase --continue) | 251 unresolved conflicts (see hg resolve, then hg rebase --continue) |
252 [1] | 252 [1] |
253 | 253 |
254 $ hg rebase --abort | 254 $ hg rebase --abort |
255 rebase aborted | 255 rebase aborted |
700 When the sourcecommitlimit is small and we have more drafts, we use heuristics only | 700 When the sourcecommitlimit is small and we have more drafts, we use heuristics only |
701 | 701 |
702 $ hg rebase -s 1 -d . | 702 $ hg rebase -s 1 -d . |
703 rebasing 1:8b6e13696c38 "added more things to a" | 703 rebasing 1:8b6e13696c38 "added more things to a" |
704 file 'a' was deleted in local [dest] but was modified in other [source]. | 704 file 'a' was deleted in local [dest] but was modified in other [source]. |
705 What do you want to do? | 705 You can use (c)hanged version, leave (d)eleted, or leave (u)nresolved. |
706 use (c)hanged version, leave (d)eleted, or leave (u)nresolved? u | 706 What do you want to do? u |
707 unresolved conflicts (see hg resolve, then hg rebase --continue) | 707 unresolved conflicts (see hg resolve, then hg rebase --continue) |
708 [1] | 708 [1] |
709 | 709 |
710 But when we have "sourcecommitlimit > (no. of drafts from base to c1)", we do | 710 But when we have "sourcecommitlimit > (no. of drafts from base to c1)", we do |
711 fullcopytracing | 711 fullcopytracing |