~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_versionedfile.py

  • Committer: Aaron Bentley
  • Date: 2007-06-11 05:11:53 UTC
  • mto: (2520.5.2 bzr.mpbundle)
  • mto: This revision was merged to the branch mainline in revision 2631.
  • Revision ID: aaron.bentley@utoronto.ca-20070611051153-rn2cxa7sn8xxh2j5
Implement plain strategy for extracting and installing multiparent diffs

Show diffs side-by-side

added added

removed removed

Lines of Context:
247
247
        self.assertEqual(['line'], f.get_lines('eolbeforefirstparent'))
248
248
        #self.assertTrue(deltas['eolbeforefirstparent'] in expected_deltas)
249
249
 
 
250
    def test_make_mpdiff(self):
 
251
        from bzrlib import multiparent
 
252
        vf = self.get_file('foo')
 
253
        sha1s = self._setup_for_deltas(vf)
 
254
        new_vf = self.get_file('bar')
 
255
        for version in multiparent.topo_iter(vf):
 
256
            mpdiff = vf.make_mpdiff(version)
 
257
            new_vf.add_mpdiff(version, vf.get_parents(version), mpdiff)
 
258
            self.assertEqualDiff(vf.get_text(version),
 
259
                                 new_vf.get_text(version))
 
260
 
250
261
    def _setup_for_deltas(self, f):
251
262
        self.assertRaises(errors.RevisionNotPresent, f.get_delta, 'base')
252
263
        # add texts that should trip the knit maximum delta chain threshold