~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_branchbuilder.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2011-04-29 11:07:14 UTC
  • mfrom: (5813.1.1 realname-can-be-empty)
  • Revision ID: pqm@pqm.ubuntu.com-20110429110714-wr9f71ea9600lvb6
(jelmer) Allow realname to be empty in tests. (Jelmer Vernooij)

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
    )
322
321
                             ], d_tree)
323
322
        # Because we copied the exact text into *this* tree, the 'c' file
324
323
        # should look like it was not modified in the merge
325
 
        self.assertEqual('C-id', d_tree.inventory['c-id'].revision)
326
 
 
 
324
        self.assertEqual('C-id', d_tree.get_file_revision('c-id'))
 
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()