[Bug 5049] New: "archive -t zip" over "hg serve --cmdserver pipe" produces broken ZIP

mercurial-bugs at selenic.com mercurial-bugs at selenic.com
Mon Jan 18 22:05:26 UTC 2016


https://bz.mercurial-scm.org/show_bug.cgi?id=5049

            Bug ID: 5049
           Summary: "archive -t zip" over "hg serve --cmdserver pipe"
                    produces broken ZIP
           Product: Mercurial
           Version: 3.6.3
          Hardware: PC
                OS: Windows
            Status: UNCONFIRMED
          Severity: bug
          Priority: wish
         Component: Mercurial
          Assignee: bugzilla at selenic.com
          Reporter: anton.gogolev at gmail.com
                CC: mercurial-devel at selenic.com

Mercurial 3.6.3, Windows 8 (64 bit)

With the "reference" client from over here (
https://www.mercurial-scm.org/wiki/CommandServer ):

$ python client.py archive -R d:\repo -t zip --prefix "%b-%h" d:\valid.zip

Tweaked the "reference" client to read:

    # receive the response
    with open('invalid.zip', 'wb') as f:
        while True:
            channel, val = readchannel(server)
            if channel == 'o':
                f.write(val)
            elif channel == 'e':
                # ...

Now, after running:

$ python client.py archive -R d:\repo -t zip --prefix "%b-%h" -

"invalid.zip" appears to be corrupt. Diffing the two ZIP files produces
suspiciously repeating pattern in which occurences of

    ... 00 00 A4 81 xx xx 00 00 ...

from "valid.zip" end up looking like

    ... 00 00 A4 81 00 00 00 00 ...

in "invalid.zip".

-- 
You are receiving this mail because:
You are on the CC list for the bug.


More information about the Mercurial-devel mailing list