IOError when launching TortoiseHg's shelve dialog via custom tool
Created originally on Bitbucket by fritzophrenic NA (Ben Fritz)
I can use "thg shelve" just fine from a Windows cmd.exe shell. But using it from TortoiseHg fails. Specifically, I created a custom tool to put a button on the toolbar:
Tool name: Shelve Command: thg shelve Working Directory: {ROOT} Tool label: Shelve Tooltip: GUI shelve tool
But when I click the button for the custom tool, I get an error as follows:
#!python
** Mercurial version (3.6.2). TortoiseHg version (3.6.2)
** Command: --nofork workbench
** CWD: \\?\E:\Project_Files\my-project
** Encoding: cp1252
** Extensions loaded: hggit, hgsubversion, win32lfn, svnbindings, histedit, strip, mq, rebase, shelve
** Python version: 2.7.9 (default, Dec 10 2014, 12:28:03) [MSC v.1500 64 bit (AMD64)]
** Windows version: sys.getwindowsversion(major=6, minor=1, build=7601, platform=2, service_pack='Service Pack 1')
** Processor architecture: x64
** Qt-4.8.6 PyQt-4.11.3 QScintilla-2.8.4
Traceback (most recent call last):
File "tortoisehg\hgqt\repotreemodel.pyo", line 429, in _updateItem
File "tortoisehg\hgqt\repotreemodel.pyo", line 424, in _updateBaseNode
File "tortoisehg\util\hglib.pyo", line 133, in repoidnode
File "tortoisehg\util\hglib.pyo", line 120, in _firstchangectx
File "tortoisehg\hgqt\thgrepo.pyo", line 714, in __getitem__
File "mercurial\localrepo.pyo", line 501, in __getitem__
File "mercurial\context.pyo", line 391, in __init__
File "mercurial\repoview.pyo", line 302, in changelog
File "mercurial\localrepo.pyo", line 30, in __get__
File "mercurial\scmutil.pyo", line 1129, in __get__
File "mercurial\localrepo.pyo", line 464, in changelog
File "mercurial\changelog.pyo", line 141, in __init__
File "mercurial\revlog.pyo", line 244, in __init__
File "mercurial\store.pyo", line 455, in __call__
File "mercurial\scmutil.pyo", line 516, in __call__
File "C:/Project_Files/Outside_Tools/win32lfn/src/win32lfn.py", line 116, in fn
File "mercurial\windows.pyo", line 114, in posixfile
IOError: [Errno 22] \\?\E:\Project_Files\my-project\.hg/store\00changelog.i: The filename, directory name, or volume label syntax is incorrect
The command works fine, if I change "thg shelve" in the command field, to "cmd /c thg shelve" instead. I was advised on the TortoiseHg mailing list, that the issue is probably in the plugin.