~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

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

  • Committer: Martin von Gagern
  • Date: 2011-06-01 12:53:56 UTC
  • mto: This revision was merged to the branch mainline in revision 6009.
  • Revision ID: martin.vgagern@gmx.net-20110601125356-lwozv2vecea6hxfz
Change from no_decorate to classify as name for the argument.

The command line switch remains as --no-classify, to keep backwards
compatibility.  Users are free to include --no-classify in an alias, and
still use --classify to change back.

Show diffs side-by-side

added added

removed removed

Lines of Context:
18
18
 
19
19
import os
20
20
 
21
 
from bzrlib import uncommit
 
21
from bzrlib import uncommit, workingtree
22
22
from bzrlib.bzrdir import BzrDirMetaFormat1
23
 
from bzrlib.errors import BoundBranchOutOfDate
 
23
from bzrlib.errors import BzrError, BoundBranchOutOfDate
24
24
from bzrlib.tests import TestCaseWithTransport
25
25
from bzrlib.tests.script import (
26
26
    run_script,
280
280
        tree.commit(u'\u1234 message')
281
281
        out, err = self.run_bzr('uncommit --force tree', encoding='ascii')
282
282
        self.assertContainsRe(out, r'\? message')
283
 
 
284
 
    def test_uncommit_removes_tags(self):
285
 
        tree = self.make_branch_and_tree('tree')
286
 
        revid = tree.commit('message')
287
 
        tree.branch.tags.set_tag("atag", revid)
288
 
        out, err = self.run_bzr('uncommit --force tree')
289
 
        self.assertEquals({}, tree.branch.tags.get_tag_dict())
290
 
 
291
 
    def test_uncommit_keep_tags(self):
292
 
        tree = self.make_branch_and_tree('tree')
293
 
        revid = tree.commit('message')
294
 
        tree.branch.tags.set_tag("atag", revid)
295
 
        out, err = self.run_bzr('uncommit --keep-tags --force tree')
296
 
        self.assertEquals({"atag": revid}, tree.branch.tags.get_tag_dict())