/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/branch_implementations/test_branch.py

  • Committer: Martin Pool
  • Date: 2007-08-20 05:48:40 UTC
  • mfrom: (2727 +trunk)
  • mto: This revision was merged to the branch mainline in revision 2737.
  • Revision ID: mbp@sourcefrog.net-20070820054840-x2ugmd9dc4yodw9o
merge trunk

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# Copyright (C) 2005, 2006 Canonical Ltd
 
1
# Copyright (C) 2005, 2006, 2007 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
47
47
from bzrlib.transport.memory import MemoryServer
48
48
from bzrlib.upgrade import upgrade
49
49
from bzrlib.workingtree import WorkingTree
 
50
from bzrlib.symbol_versioning import (
 
51
    zero_ninetyone,
 
52
    )
50
53
 
51
54
 
52
55
class TestBranch(TestCaseWithBranch):
53
56
 
54
 
    def test_append_revisions(self):
55
 
        """Test appending more than one revision"""
56
 
        wt = self.make_branch_and_tree('tree')
57
 
        wt.commit('f', rev_id='rev1')
58
 
        wt.commit('f', rev_id='rev2')
59
 
        wt.commit('f', rev_id='rev3')
60
 
 
61
 
        br = self.get_branch()
62
 
        br.fetch(wt.branch)
63
 
        br.append_revision("rev1")
64
 
        self.assertEquals(br.revision_history(), ["rev1",])
65
 
        br.append_revision("rev2", "rev3")
66
 
        self.assertEquals(br.revision_history(), ["rev1", "rev2", "rev3"])
67
 
        self.assertRaises(errors.ReservedId, br.append_revision, 'current:')
68
 
 
69
57
    def test_create_tree_with_merge(self):
70
58
        tree = self.create_tree_with_merge()
71
59
        ancestry_graph = tree.branch.repository.get_revision_graph('rev-3')