Mercurial > hg
view tests/test-issue522.t @ 44581:b746a22349f9
ui: use "procutil.shellsplit" to parse command
A commandline containing a space ('"C:\\Program Files\\bar.exe" "..."')
must not simply split at whitespace, instead quoting has to be taken into
account. Use "shlex.split()" to parse it instead.
This can improve the error message if we fail to launch a user
configured
editor which does not exist. Consider
[ui]
editor = "C:\Program Files\editor\editor.exe"
where the path does not exist. "hg histedit" currently aborts with
> Abort: edit failed: Program exited with status 1
here "Program" is not part of the message but the name of the program
that failed (i.e. `basename("C:\\Program ")`). With this change the message
instead reads
> Abort: edit failed: C:\Program Files\editor\editor.exe exited with
> status 1
which is also not ideal since infact "cmd.exe" exited with code 1, not
the editor. But the real error message ("File not found") gets swallowed by
`procutil` and including the correct path improves the error message
nevertheless.
author | Micha Wiedenmann <mw-u2@posteo.de> |
---|---|
date | Thu, 19 Mar 2020 16:06:24 +0100 |
parents | baf3fe2977cc |
children | ccd76e292be5 |
line wrap: on
line source
https://bz.mercurial-scm.org/522 In the merge below, the file "foo" has the same contents in both parents, but if we look at the file-level history, we'll notice that the version in p1 is an ancestor of the version in p2. This test makes sure that we'll use the version from p2 in the manifest of the merge revision. $ hg init $ echo foo > foo $ hg ci -qAm 'add foo' $ echo bar >> foo $ hg ci -m 'change foo' $ hg backout -r tip -m 'backout changed foo' reverting foo changeset 2:4d9e78aaceee backs out changeset 1:b515023e500e $ hg up -C 0 1 files updated, 0 files merged, 0 files removed, 0 files unresolved $ touch bar $ hg ci -qAm 'add bar' $ hg merge --debug resolving manifests branchmerge: True, force: False, partial: False ancestor: bbd179dfa0a7, local: 71766447bdbb+, remote: 4d9e78aaceee foo: remote is newer -> g getting foo 1 files updated, 0 files merged, 0 files removed, 0 files unresolved (branch merge, don't forget to commit) $ hg debugstate | grep foo m 0 -2 unset foo $ hg st -A foo M foo $ hg ci -m 'merge' $ hg manifest --debug | grep foo c6fc755d7e68f49f880599da29f15add41f42f5a 644 foo $ hg debugindex foo rev linkrev nodeid p1 p2 0 0 2ed2a3912a0b 000000000000 000000000000 1 1 6f4310b00b9a 2ed2a3912a0b 000000000000 2 2 c6fc755d7e68 6f4310b00b9a 000000000000