~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/per_interrepository/test_fetch.py

  • Committer: Jelmer Vernooij
  • Date: 2011-05-10 07:46:15 UTC
  • mfrom: (5844 +trunk)
  • mto: This revision was merged to the branch mainline in revision 5845.
  • Revision ID: jelmer@samba.org-20110510074615-eptod049ndjxc4i7
Merge bzr.dev.

Show diffs side-by-side

added added

removed removed

Lines of Context:
76
76
            tree.lock_read()
77
77
            self.addCleanup(tree.unlock)
78
78
            tree.get_file_text('file1')
79
 
            for file_id in tree:
 
79
            for file_id in tree.all_file_ids():
80
80
                if tree.inventory[file_id].kind == "file":
81
81
                    tree.get_file(file_id).read()
82
82
 
451
451
    def test_fetch_missing_revision_same_location_fails(self):
452
452
        repo_a = self.make_repository('.')
453
453
        repo_b = repository.Repository.open('.')
454
 
        try:
455
 
            self.assertRaises(errors.NoSuchRevision, repo_b.fetch, repo_a, revision_id='XXX')
456
 
        except errors.LockError, e:
457
 
            check_old_format_lock_error(self.repository_format)
 
454
        self.assertRaises(errors.NoSuchRevision,
 
455
            repo_b.fetch, repo_a, revision_id='XXX')
458
456
 
459
457
    def test_fetch_same_location_trivial_works(self):
460
458
        repo_a = self.make_repository('.')
461
459
        repo_b = repository.Repository.open('.')
462
 
        try:
463
 
            repo_a.fetch(repo_b)
464
 
        except errors.LockError, e:
465
 
            check_old_format_lock_error(self.repository_format)
 
460
        repo_a.fetch(repo_b)
466
461
 
467
462
    def test_fetch_missing_text_other_location_fails(self):
468
463
        source_tree = self.make_branch_and_tree('source')