Mercurial > public > mercurial-scm > hg-stable
comparison mercurial/revlog.py @ 301:5add718d92db
revlog: allow duplicates
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
revlog: allow duplicates
If two branches make the same change to the same parent, the result
will be an identical hash. Git apparently does this all the time. Deal
with it gracefully.
manifest hash: c6217eab4b310e1ae529dd75ab90e717dbe5d55d
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.0 (GNU/Linux)
iD8DBQFCqU61ywK+sNU5EO8RAkFqAJ9KhWUQgjZbzzB/+mTkolH0GkT1awCfa+Mj
ulbI4xCRZcvfQE492mcNwQA=
=N6In
-----END PGP SIGNATURE-----
author | mpm@selenic.com |
---|---|
date | Fri, 10 Jun 2005 00:26:29 -0800 |
parents | 9a9ea2d1d3c4 |
children | f06a4a3b86a7 |
comparison
equal
deleted
inserted
replaced
300:d3400605d246 | 301:5add718d92db |
---|---|
244 if p1 is None: p1 = self.tip() | 244 if p1 is None: p1 = self.tip() |
245 if p2 is None: p2 = nullid | 245 if p2 is None: p2 = nullid |
246 | 246 |
247 node = hash(text, p1, p2) | 247 node = hash(text, p1, p2) |
248 | 248 |
249 if node in self.nodemap: | |
250 return node | |
251 | |
249 n = self.count() | 252 n = self.count() |
250 t = n - 1 | 253 t = n - 1 |
251 | 254 |
252 if n: | 255 if n: |
253 base = self.base(t) | 256 base = self.base(t) |