/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 bzrlib/tests/test_graph.py

  • Committer: Andrew Bennetts
  • Date: 2009-06-03 04:42:02 UTC
  • mfrom: (4399 +trunk)
  • mto: This revision was merged to the branch mainline in revision 4401.
  • Revision ID: andrew.bennetts@canonical.com-20090603044202-bq5pwfme4fve3xbt
Merge, resolving NEWS conflict.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1558
1558
        result = _mod_graph.PendingAncestryResult(['rev-2'], repo)
1559
1559
        self.assertEqual(set(['rev-1', 'rev-2']), set(result.get_keys()))
1560
1560
 
 
1561
    def test_get_keys_excludes_ghosts(self):
 
1562
        builder = self.make_branch_builder('b')
 
1563
        builder.start_series()
 
1564
        builder.build_snapshot('rev-1', None, [
 
1565
            ('add', ('', 'root-id', 'directory', ''))])
 
1566
        builder.build_snapshot('rev-2', ['rev-1', 'ghost'], [])
 
1567
        builder.finish_series()
 
1568
        repo = builder.get_branch().repository
 
1569
        repo.lock_read()
 
1570
        self.addCleanup(repo.unlock)
 
1571
        result = _mod_graph.PendingAncestryResult(['rev-2'], repo)
 
1572
        self.assertEqual(sorted(['rev-1', 'rev-2']), sorted(result.get_keys()))
 
1573
 
1561
1574
    def test_get_keys_excludes_null(self):
1562
1575
        # Make a 'graph' with an iter_ancestry that returns NULL_REVISION
1563
1576
        # somewhere other than the last element, which can happen in real