~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

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

  • Committer: John Arbash Meinel
  • Date: 2010-02-17 17:11:16 UTC
  • mfrom: (4797.2.17 2.1)
  • mto: (4797.2.18 2.1)
  • mto: This revision was merged to the branch mainline in revision 5055.
  • Revision ID: john@arbash-meinel.com-20100217171116-h7t9223ystbnx5h8
merge bzr.2.1 in preparation for NEWS entry.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# Copyright (C) 2005-2010 Canonical Ltd
 
1
# Copyright (C) 2005, 2006, 2008 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
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 ScriptRunner
26
25
 
27
26
 
28
27
class TestUncommit(TestCaseWithTransport):
217
216
    def test_uncommit_shows_log_with_revision_id(self):
218
217
        wt = self.create_simple_tree()
219
218
 
220
 
        script = ScriptRunner()
221
 
        script.run_script(self, """
222
 
$ cd tree
223
 
$ bzr uncommit --force 
224
 
    2 ...
225
 
      second commit
226
 
...
227
 
The above revision(s) will be removed.
228
 
You can restore the old tip by running:
229
 
  bzr pull . -r revid:a2
230
 
""")
 
219
        out, err = self.run_bzr('uncommit --force', working_dir='tree')
 
220
        self.assertContainsRe(out, r'second commit')
 
221
        self.assertContainsRe(err, r'You can restore the old tip by running')
 
222
        self.assertContainsRe(err, r'bzr pull . -r revid:a2')
231
223
 
232
224
    def test_uncommit_octopus_merge(self):
233
225
        # Check that uncommit keeps the pending merges in the same order