/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 breezy/commit_signature_commands.py

  • Committer: Jelmer Vernooij
  • Date: 2018-11-12 01:41:38 UTC
  • mto: (7143.16.20 even-more-cleanups)
  • mto: This revision was merged to the branch mainline in revision 7175.
  • Revision ID: jelmer@jelmer.uk-20181112014138-3b0zyx91cu3wdq3k
More PEP8 fixes.

Show diffs side-by-side

added added

removed removed

Lines of Context:
14
14
# along with this program; if not, write to the Free Software
15
15
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
16
16
 
17
 
"""Command which looks for unsigned commits by the current user, and signs them.
18
 
"""
 
17
"""Command that signs unsigned commits by the current user. """
19
18
 
20
19
from __future__ import absolute_import
21
20
 
87
86
                    count += 1
88
87
                    if not dry_run:
89
88
                        repo.sign_revision(rev_id, gpg_strategy)
90
 
            except:
 
89
            except BaseException:
91
90
                repo.abort_write_group()
92
91
                raise
93
92
            else:
94
93
                repo.commit_write_group()
95
94
        self.outf.write(
96
 
            ngettext('Signed %d revision.\n', 'Signed %d revisions.\n', count) %
97
 
            count)
 
95
            ngettext('Signed %d revision.\n', 'Signed %d revisions.\n',
 
96
                     count) % count)
98
97
 
99
98
 
100
99
class cmd_verify_signatures(Command):
143
142
                if to_revid is None:
144
143
                    to_revno = branch.revno()
145
144
                if from_revno is None or to_revno is None:
146
 
                    raise errors.BzrCommandError(gettext(
147
 
                        'Cannot verify a range of non-revision-history revisions'))
 
145
                    raise errors.BzrCommandError(
 
146
                        gettext('Cannot verify a range of non-revision-history'
 
147
                                ' revisions'))
148
148
                for revno in range(from_revno, to_revno + 1):
149
149
                    revisions.append(branch.get_rev_id(revno))
150
150
        else: