diff --git a/mercurial/bundle2.py b/mercurial/bundle2.py --- a/mercurial/bundle2.py +++ b/mercurial/bundle2.py @@ -2528,6 +2528,8 @@ def handlestreamv2bundle(op, part): requirements = urlreq.unquote(part.params[b'requirements']).split(b',') + if requirements == [b'']: + requirements = [] filecount = int(part.params[b'filecount']) bytecount = int(part.params[b'bytecount']) diff --git a/tests/test-clone-stream.t b/tests/test-clone-stream.t --- a/tests/test-clone-stream.t +++ b/tests/test-clone-stream.t @@ -817,3 +817,9 @@ $ killdaemons.py #endif + +Cloning a repo with no requirements doesn't give some obscure error + + $ mkdir -p empty-repo/.hg + $ hg clone -q --stream ssh://user@dummy/empty-repo empty-repo2 + $ hg --cwd empty-repo2 verify -q