How to get rid of big binary files buried in my repository's history
Martin Geisler
mg at daimi.au.dk
Wed Feb 25 14:39:03 UTC 2009
Matt Mackall <mpm at selenic.com> writes:
> On Wed, 2009-02-25 at 09:44 +0100, Martin Geisler wrote:
>> * convert the repository hg -> hg and use a filemap.
>>
>> I don't know why, but this will change revision hashes on all
>> changesets, including those from before the file was added.
>
> Given you're part of crew now, you ought to know why:
>
> The changeset id is a hash of every byte in the given changeset AND
> its parents. You can't change any byte anywhere in history without
> breaking it.
I do know how a hash chain works, I study cryptography for a living :-)
But that doesn't really answer the question: the convert extension ought
to be able to regenerate the first (unaffected) changesets without
changing their hash values.
It is a session like this that surprices me:
% hg init repo1
% touch repo1/a
% hg add repo1/a
% hg commit -d '0 0' -u 'u' -m 'm' repo1/a
% hg log repo1
changeset: 0:c8d4479642ea
tag: tip
user: u
date: Thu Jan 01 00:00:00 1970 +0000
summary: m
% hg convert repo1 repo2
initializing destination repo2 repository
scanning source...
sorting...
converting...
0 m
% hg log repo2
changeset: 0:46c292dd1443
tag: tip
user: u
date: Thu Jan 01 00:00:00 1970 +0000
summary: m
My guess is that the convert extension add some extra meta data stuff to
the changeset when converting it.
--
Martin Geisler
VIFF (Virtual Ideal Functionality Framework) brings easy and efficient
SMPC (Secure Multiparty Computation) to Python. See: http://viff.dk/.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 196 bytes
Desc: not available
URL: <http://lists.mercurial-scm.org/pipermail/mercurial/attachments/20090225/cd8e1327/attachment-0001.asc>
More information about the Mercurial
mailing list