~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/sign_my_commits.py

  • Committer: Martin Pool
  • Date: 2006-06-20 03:57:11 UTC
  • mto: This revision was merged to the branch mainline in revision 1798.
  • Revision ID: mbp@sourcefrog.net-20060620035711-400bb6b6bc6ff95b
Add pyflakes makefile target; fix many warnings

Show diffs side-by-side

added added

removed removed

Lines of Context:
17
17
"""Command which looks for unsigned commits by the current user, and signs them.
18
18
"""
19
19
 
 
20
from bzrlib import config, gpg
20
21
from bzrlib.commands import Command
21
 
import bzrlib.config
22
 
import bzrlib.errors as errors
23
 
import bzrlib.gpg
 
22
from bzrlib.bzrdir import BzrDir
24
23
from bzrlib.option import Option
25
24
 
26
25
 
44
43
 
45
44
    def run(self, location=None, committer=None, dry_run=False):
46
45
        if location is None:
47
 
            bzrdir = bzrlib.bzrdir.BzrDir.open_containing('.')[0]
 
46
            bzrdir = BzrDir.open_containing('.')[0]
48
47
        else:
49
48
            # Passed in locations should be exact
50
 
            bzrdir = bzrlib.bzrdir.BzrDir.open(location)
 
49
            bzrdir = BzrDir.open(location)
51
50
        branch = bzrdir.open_branch()
52
51
        repo = branch.repository
53
 
        config = bzrlib.config.BranchConfig(branch)
54
 
 
 
52
        branch_config = config.BranchConfig(branch)
55
53
        if committer is None:
56
 
            committer = config.username()
57
 
 
58
 
        gpg_strategy = bzrlib.gpg.GPGStrategy(config)
 
54
            committer = branch_config.username()
 
55
        gpg_strategy = gpg.GPGStrategy(branch_config)
59
56
 
60
57
        count = 0
61
58
        repo.lock_write()