This is an archive of the discontinued Mercurial Phabricator instance.

streamclone: avoid some obscure error in a corner case
ClosedPublic

Authored by valentin.gatienbaron on Mar 24 2022, 12:36 PM.

Details

Summary

I don't really know how, but I ran into this error:

$ hg clone --stream ssh://user@dummy/empty-repo local-empty-repo
streaming all changes
abort: unable to apply stream clone: unsupported format:
[255]

I think you need an empty list of requirements for this to happen,
which is weird, but an obscure error like this is not exactly helpful
either. Since this is the result of an encoding bug anyway, just fix
it.

Diff Detail

Repository
rHG Mercurial
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

joerg.sonnenberger added inline comments.
mercurial/bundle2.py
2533
requirements = urlreq.unquote(part.params[b'requirements'])
requirements = requirements.split(b',') if requirements else []

or so may be better.

valentin.gatienbaron marked an inline comment as done.Mar 26 2022, 2:43 PM
Alphare accepted this revision.Mar 28 2022, 5:07 AM
This revision is now accepted and ready to land.Mar 28 2022, 5:07 AM