Merge lp:~jelmer/bzr/gpg-no-tty into lp:bzr/2.5

Proposed by Jelmer Vernooij
Status: Merged
Approved by: Martin Packman
Approved revision: no longer in the source branch.
Merged at revision: 6504
Proposed branch: lp:~jelmer/bzr/gpg-no-tty
Merge into: lp:bzr/2.5
Diff against target: 55 lines (+6/-4)
3 files modified
bzrlib/gpg.py (+1/-1)
bzrlib/tests/test_gpg.py (+3/-3)
doc/en/release-notes/bzr-2.5.txt (+2/-0)
To merge this branch: bzr merge lp:~jelmer/bzr/gpg-no-tty
Reviewer Review Type Date Requested Status
Martin Packman (community) Approve
Review via email: mp+112245@code.launchpad.net

Commit message

Revert patch to specify --no-tty argument to gpg.

Description of the change

Revert the use of --no-tty when signing using GPG.

See bug 1014570 for background.

To post a comment you must log in.
Revision history for this message
Martin Packman (gz) wrote :

Looks good, along with reopening the original bug to do something about the bzr explorer case.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'bzrlib/gpg.py'
--- bzrlib/gpg.py 2012-02-27 20:16:25 +0000
+++ bzrlib/gpg.py 2012-06-26 23:10:25 +0000
@@ -190,7 +190,7 @@
190 # use the user email address190 # use the user email address
191 key = config.extract_email_address(self._config_stack.get('email'))191 key = config.extract_email_address(self._config_stack.get('email'))
192 return [self._config_stack.get('gpg_signing_command'), '--clearsign',192 return [self._config_stack.get('gpg_signing_command'), '--clearsign',
193 '-u', key, '--no-tty']193 '-u', key]
194194
195 def sign(self, content):195 def sign(self, content):
196 if isinstance(content, unicode):196 if isinstance(content, unicode):
197197
=== modified file 'bzrlib/tests/test_gpg.py'
--- bzrlib/tests/test_gpg.py 2012-02-26 19:21:01 +0000
+++ bzrlib/tests/test_gpg.py 2012-06-26 23:10:25 +0000
@@ -51,7 +51,7 @@
51 self.my_gpg = gpg.GPGStrategy(FakeConfig())51 self.my_gpg = gpg.GPGStrategy(FakeConfig())
5252
53 def test_signing_command_line(self):53 def test_signing_command_line(self):
54 self.assertEqual(['false', '--clearsign', '-u', 'amy@example.com', '--no-tty'],54 self.assertEqual(['false', '--clearsign', '-u', 'amy@example.com'],
55 self.my_gpg._command_line())55 self.my_gpg._command_line())
5656
57 def test_signing_command_line_from_default(self):57 def test_signing_command_line_from_default(self):
@@ -60,7 +60,7 @@
60email=Amy <amy@example.com>60email=Amy <amy@example.com>
61gpg_signing_key=default61gpg_signing_key=default
62gpg_signing_command=false'''))62gpg_signing_command=false'''))
63 self.assertEqual(['false', '--clearsign', '-u', 'amy@example.com', '--no-tty'],63 self.assertEqual(['false', '--clearsign', '-u', 'amy@example.com'],
64 my_gpg._command_line())64 my_gpg._command_line())
6565
66 def test_signing_command_line_from_email(self):66 def test_signing_command_line_from_email(self):
@@ -68,7 +68,7 @@
68 my_gpg = gpg.GPGStrategy(FakeConfig('''68 my_gpg = gpg.GPGStrategy(FakeConfig('''
69email=Amy <amy@example.com>69email=Amy <amy@example.com>
70gpg_signing_command=false'''))70gpg_signing_command=false'''))
71 self.assertEqual(['false', '--clearsign', '-u', 'amy@example.com', '--no-tty'],71 self.assertEqual(['false', '--clearsign', '-u', 'amy@example.com'],
72 my_gpg._command_line())72 my_gpg._command_line())
7373
74 def test_checks_return_code(self):74 def test_checks_return_code(self):
7575
=== modified file 'doc/en/release-notes/bzr-2.5.txt'
--- doc/en/release-notes/bzr-2.5.txt 2012-05-22 15:28:45 +0000
+++ doc/en/release-notes/bzr-2.5.txt 2012-06-26 23:10:25 +0000
@@ -32,6 +32,8 @@
32.. Fixes for situations where bzr would previously crash or give incorrect32.. Fixes for situations where bzr would previously crash or give incorrect
33 or undesirable results.33 or undesirable results.
3434
35* Revert use of --no-tty when gpg signing commits. (Jelmer Vernooij, #1014570)
36
35Documentation37Documentation
36*************38*************
3739

Subscribers

People subscribed via source and target branches