/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to breezy/tests/test_annotate.py

  • Committer: Jelmer Vernooij
  • Date: 2017-11-12 13:09:58 UTC
  • mto: This revision was merged to the branch mainline in revision 6819.
  • Revision ID: jelmer@jelmer.uk-20171112130958-6e3rstt48asiedzn
Swap arguments for annotate_iter.

Show diffs side-by-side

added added

removed removed

Lines of Context:
278
278
            verbose=verbose, full=full, show_ids=show_ids, branch=branch)
279
279
        self.assertAnnotateEqualDiff(to_file.getvalue(), expected)
280
280
 
281
 
    def assertRepoAnnotate(self, expected, repo, file_id, revision_id):
 
281
    def assertRepoAnnotate(self, expected, repo, path, revision_id):
282
282
        """Assert that the revision is properly annotated."""
283
 
        actual = list(repo.revision_tree(revision_id).annotate_iter(file_id))
 
283
        actual = list(repo.revision_tree(revision_id).annotate_iter(path))
284
284
        self.assertAnnotateEqualDiff(actual, expected)
285
285
 
286
286
    def test_annotate_duplicate_lines(self):
289
289
        repo = builder.get_branch().repository
290
290
        repo.lock_read()
291
291
        self.addCleanup(repo.unlock)
292
 
        self.assertRepoAnnotate(duplicate_base, repo, 'file-id', 'rev-base')
293
 
        self.assertRepoAnnotate(duplicate_A, repo, 'file-id', 'rev-A')
294
 
        self.assertRepoAnnotate(duplicate_B, repo, 'file-id', 'rev-B')
295
 
        self.assertRepoAnnotate(duplicate_C, repo, 'file-id', 'rev-C')
296
 
        self.assertRepoAnnotate(duplicate_D, repo, 'file-id', 'rev-D')
297
 
        self.assertRepoAnnotate(duplicate_E, repo, 'file-id', 'rev-E')
 
292
        self.assertRepoAnnotate(duplicate_base, repo, 'file', 'rev-base')
 
293
        self.assertRepoAnnotate(duplicate_A, repo, 'file', 'rev-A')
 
294
        self.assertRepoAnnotate(duplicate_B, repo, 'file', 'rev-B')
 
295
        self.assertRepoAnnotate(duplicate_C, repo, 'file', 'rev-C')
 
296
        self.assertRepoAnnotate(duplicate_D, repo, 'file', 'rev-D')
 
297
        self.assertRepoAnnotate(duplicate_E, repo, 'file', 'rev-E')
298
298
 
299
299
    def test_annotate_shows_dotted_revnos(self):
300
300
        builder = self.create_merged_trees()