/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_commit.py

  • Committer: Vincent Ladeuil
  • Date: 2011-07-06 08:58:15 UTC
  • mfrom: (5609.48.2 2.3)
  • mto: (6012.1.1 trunk)
  • mto: This revision was merged to the branch mainline in revision 6013.
  • Revision ID: v.ladeuil+lp@free.fr-20110706085815-6leauod52jq2u43d
MergingĀ inĀ 2.3

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# Copyright (C) 2005-2010 Canonical Ltd
 
1
# Copyright (C) 2005-2011 Canonical Ltd
2
2
#
3
3
# This program is free software; you can redistribute it and/or modify
4
4
# it under the terms of the GNU General Public License as published by
21
21
from bzrlib import (
22
22
    bzrdir,
23
23
    errors,
24
 
    lockdir,
25
 
    osutils,
26
 
    tests,
27
24
    )
28
25
from bzrlib.branch import Branch
29
 
from bzrlib.bzrdir import BzrDir, BzrDirMetaFormat1
 
26
from bzrlib.bzrdir import BzrDirMetaFormat1
30
27
from bzrlib.commit import Commit, NullCommitReporter
31
28
from bzrlib.config import BranchConfig
32
29
from bzrlib.errors import (PointlessCommit, BzrError, SigningFailed,
33
30
                           LockContention)
34
31
from bzrlib.tests import SymlinkFeature, TestCaseWithTransport
35
 
from bzrlib.workingtree import WorkingTree
36
32
 
37
33
 
38
34
# TODO: Test commit with some added, and added-but-missing files
385
381
        wt = self.make_branch_and_tree('.')
386
382
        branch = wt.branch
387
383
        wt.commit("base", allow_pointless=True, rev_id='A')
388
 
        self.failIf(branch.repository.has_signature_for_revision_id('A'))
 
384
        self.assertFalse(branch.repository.has_signature_for_revision_id('A'))
389
385
        try:
390
386
            from bzrlib.testament import Testament
391
387
            # monkey patch gpg signing mechanism
409
405
        wt = self.make_branch_and_tree('.')
410
406
        branch = wt.branch
411
407
        wt.commit("base", allow_pointless=True, rev_id='A')
412
 
        self.failIf(branch.repository.has_signature_for_revision_id('A'))
 
408
        self.assertFalse(branch.repository.has_signature_for_revision_id('A'))
413
409
        try:
414
410
            from bzrlib.testament import Testament
415
411
            # monkey patch gpg signing mechanism
423
419
                              working_tree=wt)
424
420
            branch = Branch.open(self.get_url('.'))
425
421
            self.assertEqual(branch.revision_history(), ['A'])
426
 
            self.failIf(branch.repository.has_revision('B'))
 
422
            self.assertFalse(branch.repository.has_revision('B'))
427
423
        finally:
428
424
            bzrlib.gpg.GPGStrategy = oldstrategy
429
425