Rev 4831: (bialix) Shelve command refuse to run if there is no real terminal in file:///home/pqm/archives/thelove/bzr/%2Btrunk/
Canonical.com Patch Queue Manager
pqm at pqm.ubuntu.com
Thu Nov 26 18:19:13 GMT 2009
At file:///home/pqm/archives/thelove/bzr/%2Btrunk/
------------------------------------------------------------
revno: 4831 [merge]
revision-id: pqm at pqm.ubuntu.com-20091126181911-j0gaqxdj5dc9ozih
parent: pqm at pqm.ubuntu.com-20091126054210-6mbpjr1bstyu92wv
parent: v.ladeuil+lp at free.fr-20091126172354-trehdpr5azzq97j5
committer: Canonical.com Patch Queue Manager <pqm at pqm.ubuntu.com>
branch nick: +trunk
timestamp: Thu 2009-11-26 18:19:11 +0000
message:
(bialix) Shelve command refuse to run if there is no real terminal
modified:
NEWS NEWS-20050323055033-4e00b5db738777ff
bzrlib/shelf_ui.py shelver.py-20081005210102-33worgzwrtdw0yrm-1
=== modified file 'NEWS'
--- a/NEWS 2009-11-26 04:09:19 +0000
+++ b/NEWS 2009-11-26 17:23:54 +0000
@@ -171,6 +171,9 @@
the sha1 from the repo directly. (John Arbash Meinel)
+* Shelve command refuse to run if there is no real terminal.
+ (Alexander Belchenko)
+
Documentation
*************
=== modified file 'bzrlib/shelf_ui.py'
--- a/bzrlib/shelf_ui.py 2009-11-02 21:56:42 +0000
+++ b/bzrlib/shelf_ui.py 2009-11-26 17:06:32 +0000
@@ -253,6 +253,12 @@
:param message: The message to prompt a user with.
:return: A character.
"""
+ if not sys.stdin.isatty():
+ # Since there is no controlling terminal we will hang when trying
+ # to prompt the user, better abort now. See
+ # https://code.launchpad.net/~bialix/bzr/shelve-no-tty/+merge/14905
+ # for more context.
+ raise errors.BzrError("You need a controlling terminal.")
sys.stdout.write(message)
char = osutils.getchar()
sys.stdout.write("\r" + ' ' * len(message) + '\r')
More information about the bazaar-commits
mailing list