~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/sign_my_commits.py

  • Committer: INADA Naoki
  • Date: 2011-05-18 06:27:34 UTC
  • mfrom: (5887 +trunk)
  • mto: This revision was merged to the branch mainline in revision 5894.
  • Revision ID: songofacandy@gmail.com-20110518062734-1ilhll0rrqyyp8um
merge from lp:bzr and resolve conflicts.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# Copyright (C) 2005, 2006 Canonical Ltd
 
1
# Copyright (C) 2006, 2007, 2009, 2010, 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
20
20
from bzrlib.lazy_import import lazy_import
21
21
lazy_import(globals(), """
22
22
from bzrlib import (
23
 
    config,
 
23
    bzrdir as _mod_bzrdir,
24
24
    gpg,
25
25
    )
26
 
from bzrlib.bzrdir import BzrDir
27
26
""")
28
27
from bzrlib.commands import Command
29
28
from bzrlib.option import Option
30
29
 
31
30
 
32
31
class cmd_sign_my_commits(Command):
33
 
    """Sign all commits by a given committer.
 
32
    __doc__ = """Sign all commits by a given committer.
34
33
 
35
34
    If location is not specified the local tree is used.
36
35
    If committer is not specified the default committer is used.
50
49
 
51
50
    def run(self, location=None, committer=None, dry_run=False):
52
51
        if location is None:
53
 
            bzrdir = BzrDir.open_containing('.')[0]
 
52
            bzrdir = _mod_bzrdir.BzrDir.open_containing('.')[0]
54
53
        else:
55
54
            # Passed in locations should be exact
56
 
            bzrdir = BzrDir.open(location)
 
55
            bzrdir = _mod_bzrdir.BzrDir.open(location)
57
56
        branch = bzrdir.open_branch()
58
57
        repo = branch.repository
59
58
        branch_config = branch.get_config()