Merge lp:~markgrandi/bzr/gpg_devttynotfound_fix into lp:bzr/2.5

Proposed by Mark Grandi
Status: Merged
Approved by: Martin Packman
Approved revision: 6482
Merged at revision: 6484
Proposed branch: lp:~markgrandi/bzr/gpg_devttynotfound_fix
Merge into: lp:bzr/2.5
Diff against target: 56 lines (+7/-4)
3 files modified
bzrlib/ (+1/-1)
bzrlib/tests/ (+3/-3)
doc/en/release-notes/bzr-2.5.txt (+3/-0)
To merge this branch: bzr merge lp:~markgrandi/bzr/gpg_devttynotfound_fix
Reviewer Review Type Date Requested Status
Martin Packman (community) Needs Fixing
Jelmer Vernooij (community) Approve
Martin Pool Needs Fixing
Review via email:

Commit message

Pass --no-tty to gpg when running it from a subprocess in bzr

Description of the change

fixed problem with gpg complaining about not having a tty when using this with bazaar explorer on ubuntu

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

I think the patch is fine, based on the comments in the bug.

My only concern is whether this could cause cross-platform problems or environment-dependent problems for 2.5 with no more betas before final release. But, given that Mark says signing from the gui is broken on unix without it, perhaps it's better off merged

[tweak] There are some merge conflicts and it needs a news entry. Could you handle them, Mark?

review: Needs Fixing
6474. By Patch Queue Manager <email address hidden>

(vila) Default to no ssl cert verification on osx and windows (Vincent

6475. By Patch Queue Manager <email address hidden>

(abentley) Use colocated branch names as nicknames. (Aaron Bentley)

6476. By Patch Queue Manager <email address hidden>

(jelmer) Allow control directories to provide colocated branch support but
 not branch references. (Jelmer Vernooij)

6477. By Patch Queue Manager <email address hidden>

(jelmer) Fix 'bzr info -v' for a control directory without a repository.
 (Jelmer Vernooij)

6478. By Patch Queue Manager <email address hidden>

(gz) Use 'cacert.pem' as name for default certificate bundle on win32
 (Martin Packman)

6479. By Patch Queue Manager <email address hidden>

(vila) Release 2.5.0 (Vincent Ladeuil)

6480. By Patch Queue Manager <email address hidden>

(vila) Open 2.5.1 for bugfixes (Vincent Ladeuil)

6481. By Patch Queue Manager <email address hidden>

(vila) Remove offending debug statement breaking the texinfo sphinx
 builder (Vincent Ladeuil)

Revision history for this message
Mark Grandi (markgrandi) wrote :

I added a news entry, I was trying to ask around on how to get the complete diff as I couldn't figure out what was conflicting from the diff that launchpad gives below, but someone on irc says it merges fine locally

<LarstiQ> mgrandi: merge already looks fine to me, so just add an entry to that file
<mgrandi> isn't the merge conflicted?
<mgrandi> thats what it says to me on launchpad
<LarstiQ> mgrandi: locally it was fine, that beats what launchpad says

so I pushed the update with the news entry.

Revision history for this message
Wouter van Heyst (larstiq) wrote :

I based that comment on the output of `bzr diff -r ancestor:../2.5`. When merging into 2.5 there is a little bit more going on, I will fix this up later today.

Revision history for this message
Jelmer Vernooij (jelmer) wrote :

This change in general seems fine, but it would indeed be nice to fix up that conflict. :)

review: Approve
Revision history for this message
Martin Packman (gz) wrote :

From earlier testing, this should be safe to land on the 2.5 branch. Thanks for working on this Mark, and feel free to poke either me (or Wouter, as he volunteered) if you want to have a go at sorting out the conflict yourself.

review: Approve
6482. By Mark Grandi

merged the gpgdevttynotfound_fix branch

Revision history for this message
Martin Packman (gz) wrote :

sent to pqm by email

Revision history for this message
Martin Packman (gz) wrote :

Failed on PQM:

 File "/home/pqm/pqm-workdir/srv/2.5/bzrlib/", line 193
     '-u', key '--no-tty']
SyntaxError: invalid syntax

Wants a comma after key there.

review: Needs Fixing
6483. By Mark Grandi

fixed missing comma

Revision history for this message
Mark Grandi (markgrandi) wrote :

well that was embarassing, fixed, and i created and signed a commit so i believe it all compiles now.

Revision history for this message
Martin Pool (mbp) wrote :

sent to pqm by email

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'bzrlib/'
2--- bzrlib/ 2011-12-19 13:23:58 +0000
3+++ bzrlib/ 2012-02-27 20:20:37 +0000
4@@ -190,7 +190,7 @@
5 # use the user email address
6 key = config.extract_email_address(self._config_stack.get('email'))
7 return [self._config_stack.get('gpg_signing_command'), '--clearsign',
8- '-u', key]
9+ '-u', key, '--no-tty']
11 def sign(self, content):
12 if isinstance(content, unicode):
14=== modified file 'bzrlib/tests/'
15--- bzrlib/tests/ 2011-12-21 14:25:26 +0000
16+++ bzrlib/tests/ 2012-02-27 20:20:37 +0000
17@@ -51,7 +51,7 @@
18 self.my_gpg = gpg.GPGStrategy(FakeConfig())
20 def test_signing_command_line(self):
21- self.assertEqual(['false', '--clearsign', '-u', ''],
22+ self.assertEqual(['false', '--clearsign', '-u', '', '--no-tty'],
23 self.my_gpg._command_line())
25 def test_signing_command_line_from_default(self):
26@@ -60,7 +60,7 @@
27 email=Amy <>
28 gpg_signing_key=default
29 gpg_signing_command=false'''))
30- self.assertEqual(['false', '--clearsign', '-u', ''],
31+ self.assertEqual(['false', '--clearsign', '-u', '', '--no-tty'],
32 my_gpg._command_line())
34 def test_signing_command_line_from_email(self):
35@@ -68,7 +68,7 @@
36 my_gpg = gpg.GPGStrategy(FakeConfig('''
37 email=Amy <>
38 gpg_signing_command=false'''))
39- self.assertEqual(['false', '--clearsign', '-u', ''],
40+ self.assertEqual(['false', '--clearsign', '-u', '', '--no-tty'],
41 my_gpg._command_line())
43 def test_checks_return_code(self):
45=== modified file 'doc/en/release-notes/bzr-2.5.txt'
46--- doc/en/release-notes/bzr-2.5.txt 2012-02-24 12:15:02 +0000
47+++ doc/en/release-notes/bzr-2.5.txt 2012-02-27 20:20:37 +0000
48@@ -1072,6 +1072,9 @@
49 operations that use it, like merge, can now create trees without a root.
50 (Aaron Bentley)
52+* Fixed problem with getting errors about failing to open /dev/tty when using
53+ Bazaar Explorer to sign commits. (Mark Grandi, #847388)
55 Documentation
56 *************


People subscribed via source and target branches