~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

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

  • Committer: Robert Collins
  • Date: 2010-04-08 04:34:03 UTC
  • mfrom: (5138 +trunk)
  • mto: This revision was merged to the branch mainline in revision 5139.
  • Revision ID: robertc@robertcollins.net-20100408043403-56z0d07vdqrx7f3t
Update bugfix for 528114 to trunk.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# Copyright (C) 2005, 2006, 2008 Canonical Ltd
 
1
# Copyright (C) 2005-2010 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
25
26
 
26
27
 
27
28
class TestUncommit(TestCaseWithTransport):
216
217
    def test_uncommit_shows_log_with_revision_id(self):
217
218
        wt = self.create_simple_tree()
218
219
 
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')
 
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
""")
223
231
 
224
232
    def test_uncommit_octopus_merge(self):
225
233
        # Check that uncommit keeps the pending merges in the same order