[Bug 3650] New: hg archive -S with svn subrepo: images become corrupted
bugzilla-daemon at bz.selenic.com
bugzilla-daemon at bz.selenic.com
Fri Oct 5 08:37:20 CDT 2012
http://bz.selenic.com/show_bug.cgi?id=3650
Priority: normal
Bug ID: 3650
CC: mercurial-devel at selenic.com
Assignee: bugzilla at selenic.com
Summary: hg archive -S with svn subrepo: images become
corrupted
Severity: bug
Classification: Unclassified
OS: Linux
Reporter: thomas at intevation.de
Hardware: PC
Status: UNCONFIRMED
Version: unspecified
Component: Mercurial
Product: Mercurial
With Mercurial 2.3.2, svn 1.6.12 on Debian/squeeze:
Mercurial repo with svn subrepo included via https:
base = [svn]https://svn.wald.intevation.org/svn/mpuls/base/trunk/
base/mpulsweb/public/images/logos/ contains some images, they are marked as
binary, e.g.:
$ svn propget svn:mime-type
base/mpulsweb/public/images/logos/logo_intevation.png
application/octet-stream
Size is 2383 bytes.
$ hg archive -t files -S ../archive -I
base/mpulsweb/public/images/logos/logo_intevation.png
The result is 2382 bytes (one byte less)
original starts with:
89 50 4E 47 0D 0A 1A 0A 00 00 00 0D 49 48 44 52 .PNG.... ....IHDR
archived starts with:
89 50 4E 47 0A 1A 0A 00 00 00 0A 49 48 44 52 00 .PNG.... ...IHDR.
i.e. 0D-0A is changed to 0A, just 0D is changed to 0A.
subrepo.py uses "svn cat" to access the file, I noticed the following:
ssh hostname "svn cat
/PATH/TO/wasku/base/mpulsweb/public/images/logos/logo_intevation.png" > x1
ssh -t hostname "svn cat
/PATH/TO/wasku/base/mpulsweb/public/images/logos/logo_intevation.png" > x2
x1 is identical to the original file.
x2 is 2391 bytes long and starts with:
89 50 4E 47 0D 0D 0A 1A 0D 0A 00 00 00 0D 49 48 .PNG.... ......IH
i.e. 0A is changed to 0D-0A
With
"svn export
/PATH/TO/wasku/base/mpulsweb/public/images/logos/logo_intevation.png"
it does not matter if ssh is used with or without -t, the result is good in
both cases.
I see two ways to solve this:
1. find a way to make "svn cat" behave as expected
2. use "svn export" to access the file data (probably needs a temporary file
if not already archiving to files)
Suggestions?
--
You are receiving this mail because:
You are on the CC list for the bug.
More information about the Mercurial-devel
mailing list