[Bug 5390] New: Error running ?cmd=batch : "ValueError: need more than 0 values to unpack"
bugzilla at mercurial-scm.org
bugzilla at mercurial-scm.org
Wed Oct 5 04:00:06 UTC 2016
https://bz.mercurial-scm.org/show_bug.cgi?id=5390
Bug ID: 5390
Summary: Error running ?cmd=batch : "ValueError: need more than
0 values to unpack"
Product: Mercurial
Version: 3.8.1
Hardware: PC
OS: Windows
Status: UNCONFIRMED
Severity: feature
Priority: wish
Component: hglib
Assignee: bugzilla at selenic.com
Reporter: mappu04 at gmail.com
CC: mercurial-devel at selenic.com
Hi,
A fresh clone of a small test repository works like:
127.0.0.1 - - [05/Oct/2016 20:04:41] "GET /?cmd=capabilities HTTP/1.1"
200 -
127.0.0.1 - - [05/Oct/2016 20:04:41] "GET /?cmd=batch HTTP/1.1" 200 -
x-hgarg-1:cmds=heads+%3Bknown+nodes%3D
That works fine for hg and hg serve.
curl -H 'x-hgarg-1:cmds=heads+%3Bknown+nodes%3D'
'http://127.0.0.1:8000/?cmd=batch'
29821ff8dd2176b3f4e07b5850036bc031d68f00
;
I am attempting to wrap the wire protocol handler `hg --stdio` in a web server,
i guess similar to hgweb/protocol.py, in order to integrate with a larger
system.
Transformations works fine for the first command:
echo $'capabilities\n' | hg serve --stdio
356
lookup changegroupsubset branchmap pushkey known getbundle unbundlehash
batch ...<trimmed>
But for the second command, i have a problem:
echo $'batch\ncmds 19\nheads ;known nodes=\n' | hg serve --stdio
** unknown exception encountered, please report by visiting
** https://mercurial-scm.org/wiki/BugTracker
** Python 2.7.9 (default, Dec 10 2014, 12:28:03) [MSC v.1500 64 bit
(AMD64)]
** Mercurial Distributed SCM (version 3.8.1)
** Extensions loaded: gpg, histedit, rebase, shelve, strip
Traceback (most recent call last):
File "hg", line 49, in <module>
File "mercurial\dispatch.pyo", line 59, in run
File "mercurial\dispatch.pyo", line 125, in dispatch
File "mercurial\dispatch.pyo", line 204, in _runcatch
File "mercurial\dispatch.pyo", line 887, in _dispatch
File "mercurial\dispatch.pyo", line 632, in runcommand
File "mercurial\dispatch.pyo", line 1017, in _runcommand
File "mercurial\dispatch.pyo", line 978, in checkargs
File "mercurial\dispatch.pyo", line 884, in <lambda>
File "mercurial\util.pyo", line 1005, in check
File "mercurial\commands.pyo", line 6465, in serve
File "mercurial\sshserver.pyo", line 103, in serve_forever
File "mercurial\sshserver.pyo", line 121, in serve_one
File "mercurial\wireproto.pyo", line 539, in dispatch
File "mercurial\sshserver.pyo", line 41, in getargs
ValueError: need more than 0 values to unpack
Is this crash a DoS or? am i just misunderstanding the necessary transformation
from X-Hgarg-1 parameters?
Thanks for your time
mappu
--
You are receiving this mail because:
You are on the CC list for the bug.
More information about the Mercurial-devel
mailing list