~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

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

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2011-08-21 11:35:35 UTC
  • mfrom: (6089.1.1 trunk)
  • Revision ID: pqm@pqm.ubuntu.com-20110821113535-5pi9vz6tx6wdf62m
(vila) Merge 2.4 into trunk (including fix for #614713, #735417,
 #609187 and #812928) (Vincent Ladeuil)

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