[Bug 4316] New: debuginstall does not handle editor with quoted path with spaces
mercurial-bugs at selenic.com
mercurial-bugs at selenic.com
Tue Jul 29 04:37:02 CDT 2014
http://bz.selenic.com/show_bug.cgi?id=4316
Priority: normal
Bug ID: 4316
CC: mercurial-devel at selenic.com
Assignee: bugzilla at selenic.com
Summary: debuginstall does not handle editor with quoted path
with spaces
Severity: bug
Classification: Unclassified
OS: Windows
Reporter: zigarn+hg at gmail.com
Hardware: PC
Status: UNCONFIRMED
Version: 3.1-rc
Component: Mercurial
Product: Mercurial
If I have the following editor configuration :
[ui]
editor = "C:/Program Files (x86)/Notepad++/notepad++.exe" -multiInst
-notabbar -nosession -noPlugin
`hg debuginstall` will complain about the editor because it will search for
'"C:/Program'.
Instead of simply splitting ui.editor on spaces, a regexp to match quoted path
would be better. Something like (tested and working):
cmdpath = util.findexe(editor) or
util.findexe(re.search(r'"?([^"]+)"?(?:\s+.*)?', editor).group(1)) or
util.findexe(re.search(r'\'?([^\']+)\'?(?:\s+.*)?', editor).group(1))
--
You are receiving this mail because:
You are on the CC list for the bug.
More information about the Mercurial-devel
mailing list