Mercurial > hg
comparison mercurial/testing/storage.py @ 40430:6a917075535a
storage: also use `deltamode argument` for ifiledata
Now that lower level uses such argument, we can propagate the change to higher
layers.
author | Boris Feld <boris.feld@octobus.net> |
---|---|
date | Tue, 09 Oct 2018 23:26:35 +0200 |
parents | f1a39128da95 |
children | 22e74b5aa59d |
comparison
equal
deleted
inserted
replaced
40427:59a870a4ad6e | 40430:6a917075535a |
---|---|
739 b'\x00\x00\x00\x00\x00\x00\x04\x00\x00\x00\x04\x01' + | 739 b'\x00\x00\x00\x00\x00\x00\x04\x00\x00\x00\x04\x01' + |
740 fulltext1) | 740 fulltext1) |
741 | 741 |
742 # forceprevious=True forces a delta against the previous revision. | 742 # forceprevious=True forces a delta against the previous revision. |
743 # Special case for initial revision. | 743 # Special case for initial revision. |
744 gen = f.emitrevisions([node0], revisiondata=True, deltaprevious=True) | 744 gen = f.emitrevisions([node0], revisiondata=True, |
745 deltamode=repository.CG_DELTAMODE_PREV) | |
745 | 746 |
746 rev = next(gen) | 747 rev = next(gen) |
747 self.assertEqual(rev.node, node0) | 748 self.assertEqual(rev.node, node0) |
748 self.assertEqual(rev.p1node, nullid) | 749 self.assertEqual(rev.p1node, nullid) |
749 self.assertEqual(rev.p2node, nullid) | 750 self.assertEqual(rev.p2node, nullid) |
756 | 757 |
757 with self.assertRaises(StopIteration): | 758 with self.assertRaises(StopIteration): |
758 next(gen) | 759 next(gen) |
759 | 760 |
760 gen = f.emitrevisions([node0, node2], revisiondata=True, | 761 gen = f.emitrevisions([node0, node2], revisiondata=True, |
761 deltaprevious=True) | 762 deltamode=repository.CG_DELTAMODE_PREV) |
762 | 763 |
763 rev = next(gen) | 764 rev = next(gen) |
764 self.assertEqual(rev.node, node0) | 765 self.assertEqual(rev.node, node0) |
765 self.assertEqual(rev.p1node, nullid) | 766 self.assertEqual(rev.p1node, nullid) |
766 self.assertEqual(rev.p2node, nullid) | 767 self.assertEqual(rev.p2node, nullid) |