diff --git a/mercurial/bundle2.py b/mercurial/bundle2.py --- a/mercurial/bundle2.py +++ b/mercurial/bundle2.py @@ -2527,7 +2527,8 @@ @parthandler(b'stream2', (b'requirements', b'filecount', b'bytecount')) def handlestreamv2bundle(op, part): - requirements = urlreq.unquote(part.params[b'requirements']).split(b',') + requirements = urlreq.unquote(part.params[b'requirements']) + requirements = requirements.split(b',') if requirements else [] 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