~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_branchbuilder.py

merge trunk

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# Copyright (C) 2007, 2009 Canonical Ltd
 
1
# Copyright (C) 2007-2011 Canonical Ltd
2
2
#
3
3
# This program is free software; you can redistribute it and/or modify
4
4
# it under the terms of the GNU General Public License as published by
18
18
 
19
19
from bzrlib import (
20
20
    branch as _mod_branch,
21
 
    errors,
22
21
    revision as _mod_revision,
23
22
    tests,
24
23
    )
324
323
        # should look like it was not modified in the merge
325
324
        self.assertEqual('C-id', d_tree.inventory['c-id'].revision)
326
325
 
 
326
    def test_set_parent_to_null(self):
 
327
        builder = self.build_a_rev()
 
328
        builder.start_series()
 
329
        self.addCleanup(builder.finish_series)
 
330
        builder.build_snapshot('B-id', [],
 
331
            [('add', ('', None, 'directory', None))])
 
332
        # We should now have a graph:
 
333
        #   A B
 
334
        # And not A => B
 
335
        repo = builder.get_branch().repository
 
336
        self.assertEqual({'A-id': (_mod_revision.NULL_REVISION,),
 
337
                          'B-id': (_mod_revision.NULL_REVISION,),},
 
338
                         repo.get_parent_map(['A-id', 'B-id']))
 
339
 
 
340
    
327
341
    def test_start_finish_series(self):
328
342
        builder = BranchBuilder(self.get_transport().clone('foo'))
329
343
        builder.start_series()