~ubuntu-branches/ubuntu/natty/bzr/natty-proposed

« back to all changes in this revision

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

  • Committer: Bazaar Package Importer
  • Author(s): Jelmer Vernooij
  • Date: 2010-08-07 00:54:52 UTC
  • mfrom: (1.4.8 upstream)
  • Revision ID: james.westby@ubuntu.com-20100807005452-g4zb99ezl3xn44r4
Tags: 2.2.0-1
* New upstream release.
 + Adds support for setting timestamps to originating revisions.
   Closes: #473450
 + Removes remaining string exception. Closes: #585193, LP: #586926
 + Add C extension to work around Python issue 1628205. LP: #583941,
   Closes: #577110
 + Avoids showing progress bars when --quiet is used. Closes: #542105,
   LP: #320035
 + No longer creates ~/.bazaar as root when run under sudo. LP: #376388
 + 'bzr commit' now supports -p as alternative for --show-diff. LP: #571467
 + 'bzr add' no longer adds .THIS/.BASE/.THEIRS files unless
   explicitly requested. LP: #322767
 + When parsing patch files, Bazaar now supports diff lines before each
   patch. LP: #502076
 + WorkingTrees now no longer requires using signal.signal, so can
   be used in a threaded environment. LP: #521989
 + An assertion error is no longer triggered when pushing to a pre-1.6
   Bazaar server. LP: #528041
* Bump standards version to 3.9.1.

Show diffs side-by-side

added added

removed removed

Lines of Context:
19
19
 
20
20
import os
21
21
 
22
 
import bzrlib.gpg
 
22
from bzrlib import (
 
23
    gpg,
 
24
    tests,
 
25
    )
23
26
from bzrlib.testament import Testament
24
 
from bzrlib.tests import TestCaseWithTransport
25
27
from bzrlib.workingtree import WorkingTree
26
28
 
27
29
 
28
 
class SignMyCommits(TestCaseWithTransport):
 
30
class SignMyCommits(tests.TestCaseWithTransport):
29
31
 
30
32
    def monkey_patch_gpg(self):
31
33
        """Monkey patch the gpg signing strategy to be a loopback.
33
35
        This also registers the cleanup, so that we will revert to
34
36
        the original gpg strategy when done.
35
37
        """
36
 
        self._oldstrategy = bzrlib.gpg.GPGStrategy
37
 
 
38
38
        # monkey patch gpg signing mechanism
39
 
        bzrlib.gpg.GPGStrategy = bzrlib.gpg.LoopbackGPGStrategy
40
 
 
41
 
        self.addCleanup(self._fix_gpg_strategy)
42
 
 
43
 
    def _fix_gpg_strategy(self):
44
 
        bzrlib.gpg.GPGStrategy = self._oldstrategy
 
39
        self.overrideAttr(gpg, 'GPGStrategy', gpg.LoopbackGPGStrategy)
45
40
 
46
41
    def setup_tree(self, location='.'):
47
42
        wt = self.make_branch_and_tree(location)