changeset 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 d3400605d246
children 498fb0fa2795
files mercurial/revlog.py
diffstat 1 files changed, 3 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/revlog.py	Fri Jun 10 00:25:04 2005 -0800
+++ b/mercurial/revlog.py	Fri Jun 10 00:26:29 2005 -0800
@@ -246,6 +246,9 @@
 
         node = hash(text, p1, p2)
 
+        if node in self.nodemap:
+            return node
+
         n = self.count()
         t = n - 1