~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/blackbox/test_uncommit.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2010-02-11 04:02:41 UTC
  • mfrom: (5017.2.2 tariff)
  • Revision ID: pqm@pqm.ubuntu.com-20100211040241-w6n021dz0uus341n
(mbp) add import-tariff tests

Show diffs side-by-side

added added

removed removed

Lines of Context:
22
22
from bzrlib.bzrdir import BzrDirMetaFormat1
23
23
from bzrlib.errors import BzrError, BoundBranchOutOfDate
24
24
from bzrlib.tests import TestCaseWithTransport
25
 
from bzrlib.tests.script import (
26
 
    run_script,
27
 
    ScriptRunner,
28
 
    )
 
25
from bzrlib.tests.script import ScriptRunner
29
26
 
30
27
 
31
28
class TestUncommit(TestCaseWithTransport):
64
61
        out, err = self.run_bzr('status')
65
62
        self.assertEquals(out, 'modified:\n  a\n')
66
63
 
67
 
    def test_uncommit_interactive(self):
68
 
        """Uncommit seeks confirmation, and doesn't proceed without it."""
69
 
        wt = self.create_simple_tree()
70
 
        os.chdir('tree')
71
 
        run_script(self, """    
72
 
        $ bzr uncommit
73
 
        ...
74
 
        The above revision(s) will be removed.
75
 
        2>Uncommit these revisions? [y/n]: 
76
 
        <n
77
 
        Canceled
78
 
        """)
79
 
        self.assertEqual(['a2'], wt.get_parent_ids())
80
 
 
81
64
    def test_uncommit_no_history(self):
82
65
        wt = self.make_branch_and_tree('tree')
83
66
        out, err = self.run_bzr('uncommit --force', retcode=1)
233
216
 
234
217
    def test_uncommit_shows_log_with_revision_id(self):
235
218
        wt = self.create_simple_tree()
236
 
 
 
219
        
237
220
        script = ScriptRunner()
238
221
        script.run_script(self, """
239
222
$ cd tree