comparison mercurial/testing/storage.py @ 40322:ddeb510d6815

testing: remove expectation of error on bad node insert addgroup() doesn't necessarily validate the hashes of each incoming revision. This is an optimization that allows delta group application to complete faster. The fact that revlog raises in this particular test is an implementation detail due to the way revlogs are testing multiple deltas. Differential Revision: https://phab.mercurial-scm.org/D5115
author Gregory Szorc <gregory.szorc@gmail.com>
date Tue, 16 Oct 2018 15:24:06 +0200
parents 324b4b10351e
children 2c0aa02ecd5a
comparison
equal deleted inserted replaced
40321:6994a8be3663 40322:ddeb510d6815
1071 self.assertEqual(len(f), 0) 1071 self.assertEqual(len(f), 0)
1072 1072
1073 fulltext0 = b'foo' 1073 fulltext0 = b'foo'
1074 delta0 = mdiff.trivialdiffheader(len(fulltext0)) + fulltext0 1074 delta0 = mdiff.trivialdiffheader(len(fulltext0)) + fulltext0
1075 1075
1076 deltas = [ 1076 with self._maketransactionfn() as tr:
1077 (b'\x01' * 20, nullid, nullid, nullid, nullid, delta0, 0),
1078 ]
1079
1080 with self._maketransactionfn() as tr:
1081 with self.assertRaises(error.StorageError):
1082 f.addgroup(deltas, linkmapper, tr, addrevisioncb=cb)
1083
1084 node0 = f.add(fulltext0, None, tr, 0, nullid, nullid) 1077 node0 = f.add(fulltext0, None, tr, 0, nullid, nullid)
1085 1078
1086 f = self._makefilefn() 1079 f = self._makefilefn()
1087 1080
1088 deltas = [ 1081 deltas = [