~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_bundle.py

  • Committer: Martin Pool
  • Date: 2006-08-15 13:19:12 UTC
  • mfrom: (1923 +trunk)
  • mto: This revision was merged to the branch mainline in revision 1925.
  • Revision ID: mbp@sourcefrog.net-20060815131912-7bbc6d387bb32d16
[merge] bzr.dev

Show diffs side-by-side

added added

removed removed

Lines of Context:
27
27
from bzrlib.bundle.serializer import write_bundle, read_bundle
28
28
from bzrlib.branch import Branch
29
29
from bzrlib.diff import internal_diff
30
 
from bzrlib.errors import BzrError, TestamentMismatch, NotABundle, BadBundle
 
30
from bzrlib.errors import (BzrError, TestamentMismatch, NotABundle, BadBundle, 
 
31
                           NoSuchFile,)
31
32
from bzrlib.merge import Merge3Merger
32
33
from bzrlib.osutils import has_symlinks, sha_file
33
34
from bzrlib.tests import (TestCaseInTempDir, TestCaseWithTransport,
411
412
            for inventory_id in old:
412
413
                try:
413
414
                    old_file = old.get_file(inventory_id)
414
 
                except:
 
415
                except NoSuchFile:
415
416
                    continue
416
417
                if old_file is None:
417
418
                    continue
799
800
        self.assertEqual(19800, rev.timezone)
800
801
        self.assertEqual(1152544886.0, rev.timestamp)
801
802
 
 
803
    def test_bundle_root_id(self):
 
804
        self.tree1 = self.make_branch_and_tree('b1')
 
805
        self.b1 = self.tree1.branch
 
806
        self.tree1.commit('message', rev_id='revid1')
 
807
        bundle = self.get_valid_bundle(None, 'revid1')
 
808
        tree = bundle.revision_tree(self.b1.repository, 'revid1')
 
809
        self.assertEqual('revid1', tree.inventory.root.revision)
 
810
 
802
811
 
803
812
class MungedBundleTester(TestCaseWithTransport):
804
813