~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: 2007-12-11 07:29:35 UTC
  • mfrom: (3101.1.1 bzr.ab2)
  • Revision ID: pqm@pqm.ubuntu.com-20071211072935-5kj4hhh82rgkqqwb
Uncommit doesn't throw when it encounters un-encodable characters

Show diffs side-by-side

added added

removed removed

Lines of Context:
18
18
 
19
19
import os
20
20
 
 
21
import bzrlib
21
22
from bzrlib import uncommit, workingtree
22
23
from bzrlib.bzrdir import BzrDirMetaFormat1
23
24
from bzrlib.errors import BzrError, BoundBranchOutOfDate
227
228
        out, err = self.run_bzr('uncommit --force -r 2')
228
229
 
229
230
        self.assertEqual(['a2', 'b3', 'c3', 'c4', 'b4'], wt.get_parent_ids())
 
231
 
 
232
    def test_uncommit_nonascii(self):
 
233
        tree = self.make_branch_and_tree('tree')
 
234
        tree.commit(u'\u1234 message')
 
235
        real_encoding = bzrlib.user_encoding
 
236
        bzrlib.user_encoding = 'ascii'
 
237
        try:
 
238
            out, err = self.run_bzr('uncommit --force tree')
 
239
        finally:
 
240
            bzrlib.user_encoding = real_encoding
 
241
        self.assertContainsRe(out, r'\? message')