~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_graph.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2009-05-29 11:26:30 UTC
  • mfrom: (4343.3.39 1.15-gc-stacking)
  • Revision ID: pqm@pqm.ubuntu.com-20090529112630-p1bfpivkz3igjzn2
(jam) Fix bug #373455, allow --dev6 repos to stack.

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