"Stripping" changesets from the past of a repository
Jochen Schulz
ml at well-adjusted.de
Tue Nov 17 01:32:02 CST 2009
Jim Hewes:
>
> I thought I had read that changeset IDs were calculated based on content
> from earlier revisions. If so, wouldn't it be possible when stripping out
> earlier revisions to base the new repository on an initial dummy revision
> that had a dummy changeset ID that caused all subsequent changesets IDs to
> be the same as they were before?
If I understand it correctly, this amounts to breaking the hash
algorithm in use (SHA1, I suppose) by finding a collision (two input
texts yielding the same hash). While this is not impossible (has already
been done, AFAIK), it is generally something you don't want to be easily
doable because a lot of other uses of hash functions (mainly security
protocols) depend on this property of the hash function.
So, in a way, Mercurial is explicitly designed to prevent such things.
It really is a feature that you can count on a changeset ID representing
one and only one state of a repository.
J.
--
If politics is the blind leading the blind, entertainment is the fucked-
up leading the hypnotised.
[Agree] [Disagree]
<http://www.slowlydownward.com/NODATA/data_enter2.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: Digital signature
URL: <http://selenic.com/pipermail/mercurial/attachments/20091117/7c89da87/attachment.pgp>
More information about the Mercurial
mailing list