Mercurial > hg
view tests/test-remotefilelog-hgweb.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 | 9e63108123a4 |
children |
line wrap: on
line source
#require no-windows serve $ . "$TESTDIR/remotefilelog-library.sh" $ cat >> $HGRCPATH <<EOF > [extensions] > remotefilelog= > share= > EOF $ hg init master $ cd master $ cat >> .hg/hgrc <<EOF > [remotefilelog] > server=True > EOF $ echo x > x $ hg commit -qAm x $ cd .. $ hgcloneshallow ssh://user@dummy/master wdir --noupdate -q $ cd wdir $ hg serve -n test -p $HGPORT -d --pid-file=hg.pid -E errors.log $ cat hg.pid >> $DAEMON_PIDS $ get-with-headers.py localhost:$HGPORT 'file/tip/x' | head -n 10 200 Script output follows <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US"> <head> <link rel="icon" href="/static/hgicon.png" type="image/png" /> <meta name="robots" content="index, nofollow" /> <link rel="stylesheet" href="/static/style-paper.css" type="text/css" /> <script type="text/javascript" src="/static/mercurial.js"></script>