/breezy/trunk

To get this branch, use:
bzr branch https://code.breezy-vcs.org/breezy/trunk

« back to all changes in this revision

Viewing changes to breezy/tests/per_repository/test_repository.py

  • Committer: Jelmer Vernooij
  • Date: 2017-07-23 22:06:41 UTC
  • mfrom: (6738 trunk)
  • mto: This revision was merged to the branch mainline in revision 6739.
  • Revision ID: jelmer@jelmer.uk-20170723220641-69eczax9bmv8d6kk
Merge trunk, address review comments.

Show diffs side-by-side

added added

removed removed

Lines of Context:
424
424
            self.assertEqual(revision.revision_id, revision_id)
425
425
            self.assertEqual(revision, repo.get_revision(revision_id))
426
426
 
 
427
    def test_iter_revisions(self):
 
428
        tree = self.make_branch_and_tree('.')
 
429
        tree.commit('initial empty commit', rev_id='a-rev',
 
430
                    allow_pointless=True)
 
431
        tree.commit('second empty commit', rev_id='b-rev',
 
432
                    allow_pointless=True)
 
433
        tree.commit('third empty commit', rev_id='c-rev',
 
434
                    allow_pointless=True)
 
435
        repo = tree.branch.repository
 
436
        revision_ids = ['a-rev', 'c-rev', 'b-rev', 'd-rev']
 
437
        revid_with_rev = repo.iter_revisions(revision_ids)
 
438
        self.assertEqual(
 
439
            set((revid, rev.revision_id if rev is not None else None)
 
440
                for (revid, rev) in revid_with_rev),
 
441
            {('a-rev', 'a-rev'),
 
442
             ('b-rev', 'b-rev'),
 
443
             ('c-rev', 'c-rev'),
 
444
             ('d-rev', None)})
 
445
 
427
446
    def test_root_entry_has_revision(self):
428
447
        tree = self.make_branch_and_tree('.')
429
448
        tree.commit('message', rev_id='rev_id')