/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_uncommit.py

Add finished() notifications to transactions.

Show diffs side-by-side

added added

removed removed

Lines of Context:
4
4
 
5
5
import os
6
6
 
7
 
from bzrlib.bzrdir import BzrDirMetaFormat1
8
 
from bzrlib.errors import BzrError, BoundBranchOutOfDate
9
 
from bzrlib.uncommit import uncommit
 
7
from bzrlib.errors import BzrError
10
8
from bzrlib.tests import TestCaseInTempDir
11
9
 
12
10
class TestUncommit(TestCaseInTempDir):
63
61
 
64
62
        self.assertEquals(bzr('revno'), '1\n')
65
63
        self.assertEquals(bzr('status'), 'modified:\n  a\n')
66
 
 
67
 
    def test_uncommit_bound(self):
68
 
        os.mkdir('a')
69
 
        a = BzrDirMetaFormat1().initialize('a')
70
 
        a.create_repository()
71
 
        a.create_branch()
72
 
        t = a.create_workingtree()
73
 
        t.commit('commit 1')
74
 
        t.commit('commit 2')
75
 
        t.commit('commit 3')
76
 
        b = t.bzrdir.sprout('b').open_branch()
77
 
        b.bind(t.branch)
78
 
        uncommit(b)
79
 
        t.set_last_revision(t.branch.last_revision())
80
 
        self.assertEqual(len(b.revision_history()), 2)
81
 
        self.assertEqual(len(t.branch.revision_history()), 2)
82
 
        t.commit('commit 3b')
83
 
        self.assertRaises(BoundBranchOutOfDate, uncommit, b)
84
 
        b.pull(t.branch)
85
 
        uncommit(b)
86