Show More
@@ -952,13 +952,12 b' class ifiledatatests(basetestcase):' | |||||
952 | with self.assertRaises(error.StorageError): |
|
952 | with self.assertRaises(error.StorageError): | |
953 | f.read(node1) |
|
953 | f.read(node1) | |
954 |
|
954 | |||
955 | diff = mdiff.textdiff(fulltext1, fulltext2) |
|
|||
956 | node2 = storageutil.hashrevisionsha1(fulltext2, node1, nullid) |
|
955 | node2 = storageutil.hashrevisionsha1(fulltext2, node1, nullid) | |
957 | deltas = [(node2, node1, nullid, b'\x01' * 20, node1, diff, 0)] |
|
|||
958 |
|
956 | |||
959 | # This /might/ fail on some backends. |
|
|||
960 | with self._maketransactionfn() as tr: |
|
957 | with self._maketransactionfn() as tr: | |
961 | f.addgroup(deltas, lambda x: 0, tr) |
|
958 | delta = mdiff.textdiff(fulltext1, fulltext2) | |
|
959 | self._addrawrevisionfn(f, tr, node2, node1, nullid, | |||
|
960 | 2, delta=(1, delta)) | |||
962 |
|
961 | |||
963 | self.assertEqual(len(f), 3) |
|
962 | self.assertEqual(len(f), 3) | |
964 |
|
963 |
@@ -49,7 +49,8 b' def addrawrevision(self, fl, tr, node, p' | |||||
49 | if rawtext is not None: |
|
49 | if rawtext is not None: | |
50 | fl._revlog.addrawrevision(rawtext, tr, linkrev, p1, p2, node, flags) |
|
50 | fl._revlog.addrawrevision(rawtext, tr, linkrev, p1, p2, node, flags) | |
51 | elif delta is not None: |
|
51 | elif delta is not None: | |
52 | raise error.Abort('support for storing raw deltas not yet supported') |
|
52 | fl._revlog.addrawrevision(rawtext, tr, linkrev, p1, p2, node, flags, | |
|
53 | cachedelta=delta) | |||
53 | else: |
|
54 | else: | |
54 | raise error.Abort('must supply rawtext or delta arguments') |
|
55 | raise error.Abort('must supply rawtext or delta arguments') | |
55 |
|
56 |
General Comments 0
You need to be logged in to leave comments.
Login now