~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

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

  • Committer: Patch Queue Manager
  • Date: 2011-09-22 14:12:18 UTC
  • mfrom: (6155.3.1 jam)
  • Revision ID: pqm@pqm.ubuntu.com-20110922141218-86s4uu6nqvourw4f
(jameinel) Cleanup comments bzrlib/smart/__init__.py (John A Meinel)

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, workingtree
 
21
from bzrlib import uncommit
22
22
from bzrlib.bzrdir import BzrDirMetaFormat1
23
 
from bzrlib.errors import BzrError, BoundBranchOutOfDate
 
23
from bzrlib.errors import 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())