~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

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

(gz) Fix test failure on alpha by correcting format string for
 gc_chk_sha1_record (Martin [gz])

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())