support/download: generate reproducible Hg archives
authorYann E. MORIN <yann.morin.1998@free.fr>
Sat, 2 Jan 2016 11:35:49 +0000 (12:35 +0100)
committerPeter Korsgaard <peter@korsgaard.com>
Sun, 3 Jan 2016 20:50:38 +0000 (21:50 +0100)
commit76b51f90c0e393349dd0c71d7e6cf82fbc094282
treeb3eb4d9216199e726c79d3bd52b0842df36a47e2
parent9c4072348960d99d39f2cf47ff022f2d3711962e
support/download: generate reproducible Hg archives

When hg directly creates the output file, the hash for that file changes
everytime.

However, if we just tell hg to output the archive on stdout and we do
the redirect to the file, then the archive is reproducible.

(The reason is that in the first case, a temporary file is created and
then compressed, and gzip is adding the filename and its timestamp in
the gzip header, while in the second case, there is no temporary file,
and thus no timestamp and thus it is reproducible.)

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Cc: Yegor Yefremov <yegorslists@googlemail.com>
Tested-by: Yegor Yefremov <yegorslists@googlemail.com>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
support/download/hg