Merge lp:~knittl/bzr/cat-signature into lp:bzr
Proposed by
Daniel Knittl-Frank
Status: | Work in progress |
---|---|
Proposed branch: | lp:~knittl/bzr/cat-signature |
Merge into: | lp:bzr |
Diff against target: |
110 lines (+84/-0) 3 files modified
bzrlib/builtins.py (+25/-0) bzrlib/tests/blackbox/__init__.py (+1/-0) bzrlib/tests/blackbox/test_cat_signature.py (+58/-0) |
To merge this branch: | bzr merge lp:~knittl/bzr/cat-signature |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Daniel Knittl-Frank (community) | Needs Resubmitting | ||
John A Meinel | Needs Fixing | ||
Review via email: mp+36467@code.launchpad.net |
Description of the change
new hidden command `cat-signature` to print the signature for a commit
To post a comment you must log in.
Unmerged revisions
- 5440. By Daniel Knittl-Frank <email address hidden>
-
Copyright 2010
- 5439. By Daniel Knittl-Frank <email address hidden>
-
Use exact encoding
- 5438. By Daniel Knittl-Frank <email address hidden>
-
Fix whitespace (4, not 2 per level)
- 5437. By Daniel Knittl-Frank <email address hidden>
-
Add blackbox tests for cat-signature
- 5436. By Daniel Knittl-Frank <email address hidden>
-
Return non-zero exit code when there is no signature
- 5435. By Daniel Knittl-Frank <email address hidden>
-
Make command hidden
- 5434. By Daniel Knittl-Frank <email address hidden>
-
add cleanup line (used in cmd_testament)
- 5433. By Daniel Knittl-Frank <email address hidden>
-
rename to cat-signature to be consistent with cat-revision, etc.
- 5432. By Daniel Knittl-Frank <email address hidden>
-
new command: show-signature [-r revision] [branch]
prints the signature for the testament of a given revision
cmd_cat_signature should be indented to 4 spaces, not 2 as per our guidelines, and there should be some more spacing between options.
We probably also want the output encoding to be exact. The content should be 7-bit safe, but just in case.
I'm not sure that @display_command actually makes sense. It means that we'll ignore stuff like EPIPE, I'd probably take it off, but it isn't a big deal.
Something like:
+class cmd_cat_ signature( Command) :
+ __doc__ = """Show signature of a revision's testament"""
+
+ hidden = True
+ takes_options = ['revision']
+ takes_args = ['branch?']
+ encoding = 'exact'
+
+ def run(self, branch=u'.', revision=None):
46 tests/blackbox/ test_cat_ signature. py' tests/blackbox/ test_cat_ signature. py 1970-01-01 00:00:00 +0000 tests/blackbox/ test_cat_ signature. py 2010-09-23 16:27:46 +0000
47 === added file 'bzrlib/
48 --- bzrlib/
49 +++ bzrlib/
50 @@ -0,0 +1,58 @@
51 +# Copyright (C) 2007-2010 Canonical Ltd
Copyright for this file should be only 2010
But the tests themselves seem fine to me. And the actual functional code seems good.