Show More
@@ -78,9 +78,6 class filelog(object): | |||
|
78 | 78 | def revision(self, node, _df=None, raw=False): |
|
79 | 79 | return self._revlog.revision(node, _df=_df, raw=raw) |
|
80 | 80 | |
|
81 | def revdiff(self, rev1, rev2): | |
|
82 | return self._revlog.revdiff(rev1, rev2) | |
|
83 | ||
|
84 | 81 | def emitrevisions(self, nodes, nodesorder=None, |
|
85 | 82 | revisiondata=False, assumehaveparentrevisions=False, |
|
86 | 83 | deltaprevious=False): |
@@ -586,15 +586,6 class ifiledata(interfaceutil.Interface) | |||
|
586 | 586 | TODO better document the copy metadata and censoring logic. |
|
587 | 587 | """ |
|
588 | 588 | |
|
589 | def revdiff(rev1, rev2): | |
|
590 | """Obtain a delta between two revision numbers. | |
|
591 | ||
|
592 | Operates on raw data in the store (``revision(node, raw=True)``). | |
|
593 | ||
|
594 | The returned data is the result of ``bdiff.bdiff`` on the raw | |
|
595 | revision data. | |
|
596 | """ | |
|
597 | ||
|
598 | 589 | def emitrevisions(nodes, |
|
599 | 590 | nodesorder=None, |
|
600 | 591 | revisiondata=False, |
@@ -396,17 +396,6 class ifiledatatests(basetestcase): | |||
|
396 | 396 | with self.assertRaises(error.LookupError): |
|
397 | 397 | f.cmp(b'\x01' * 20, b'irrelevant') |
|
398 | 398 | |
|
399 | self.assertEqual(f.revdiff(nullrev, nullrev), b'') | |
|
400 | ||
|
401 | with self.assertRaises(IndexError): | |
|
402 | f.revdiff(0, nullrev) | |
|
403 | ||
|
404 | with self.assertRaises(IndexError): | |
|
405 | f.revdiff(nullrev, 0) | |
|
406 | ||
|
407 | with self.assertRaises(IndexError): | |
|
408 | f.revdiff(0, 0) | |
|
409 | ||
|
410 | 399 | # Emitting empty list is an empty generator. |
|
411 | 400 | gen = f.emitrevisions([]) |
|
412 | 401 | with self.assertRaises(StopIteration): |
@@ -459,14 +448,6 class ifiledatatests(basetestcase): | |||
|
459 | 448 | self.assertFalse(f.cmp(node, fulltext)) |
|
460 | 449 | self.assertTrue(f.cmp(node, fulltext + b'extra')) |
|
461 | 450 | |
|
462 | self.assertEqual(f.revdiff(0, 0), b'') | |
|
463 | self.assertEqual(f.revdiff(nullrev, 0), | |
|
464 | b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x07%s' % | |
|
465 | fulltext) | |
|
466 | ||
|
467 | self.assertEqual(f.revdiff(0, nullrev), | |
|
468 | b'\x00\x00\x00\x00\x00\x00\x00\x07\x00\x00\x00\x00') | |
|
469 | ||
|
470 | 451 | # Emitting a single revision works. |
|
471 | 452 | gen = f.emitrevisions([node]) |
|
472 | 453 | rev = next(gen) |
@@ -577,14 +558,6 class ifiledatatests(basetestcase): | |||
|
577 | 558 | with self.assertRaises(error.LookupError): |
|
578 | 559 | f.cmp(b'\x01' * 20, b'irrelevant') |
|
579 | 560 | |
|
580 | self.assertEqual(f.revdiff(0, 1), | |
|
581 | b'\x00\x00\x00\x00\x00\x00\x04\x00\x00\x00\x04\x01' + | |
|
582 | fulltext1) | |
|
583 | ||
|
584 | self.assertEqual(f.revdiff(0, 2), | |
|
585 | b'\x00\x00\x00\x00\x00\x00\x04\x00\x00\x00\x04\x02' + | |
|
586 | fulltext2) | |
|
587 | ||
|
588 | 561 | # Nodes should be emitted in order. |
|
589 | 562 | gen = f.emitrevisions([node0, node1, node2], revisiondata=True) |
|
590 | 563 |
@@ -487,16 +487,6 class filestorage(object): | |||
|
487 | 487 | |
|
488 | 488 | return nodes |
|
489 | 489 | |
|
490 | def revdiff(self, rev1, rev2): | |
|
491 | validaterev(rev1) | |
|
492 | validaterev(rev2) | |
|
493 | ||
|
494 | node1 = self.node(rev1) | |
|
495 | node2 = self.node(rev2) | |
|
496 | ||
|
497 | return mdiff.textdiff(self.revision(node1, raw=True), | |
|
498 | self.revision(node2, raw=True)) | |
|
499 | ||
|
500 | 490 | def heads(self, start=None, stop=None): |
|
501 | 491 | # This is copied from revlog.py. |
|
502 | 492 | if start is None and stop is None: |
General Comments 0
You need to be logged in to leave comments.
Login now