Rev 4831: Shelve command refuse to run if there is no real terminal in http://bazaar.launchpad.net/~vila/bzr/integration

Vincent Ladeuil v.ladeuil+lp at free.fr
Thu Nov 26 08:08:24 GMT 2009


At http://bazaar.launchpad.net/~vila/bzr/integration

------------------------------------------------------------
revno: 4831 [merge]
revision-id: v.ladeuil+lp at free.fr-20091126080805-g4b4nvgdafecas8c
parent: pqm at pqm.ubuntu.com-20091126054210-6mbpjr1bstyu92wv
parent: bialix at ukr.net-20091116110658-06omssmns2wf5r6g
committer: Vincent Ladeuil <v.ladeuil+lp at free.fr>
branch nick: integration
timestamp: Thu 2009-11-26 09:08:05 +0100
message:
  Shelve command refuse to run if there is no real terminal
modified:
  NEWS                           NEWS-20050323055033-4e00b5db738777ff
  bzrlib/builtins.py             builtins.py-20050830033751-fc01482b9ca23183
-------------- next part --------------
=== modified file 'NEWS'
--- a/NEWS	2009-11-26 04:09:19 +0000
+++ b/NEWS	2009-11-26 08:08:05 +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/builtins.py'
--- a/bzrlib/builtins.py	2009-11-26 04:58:09 +0000
+++ b/bzrlib/builtins.py	2009-11-26 08:08:05 +0000
@@ -5702,6 +5702,12 @@
             writer=None, list=False, destroy=False):
         if list:
             return self.run_for_list()
+        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("shelve must be run from command line only.")
         from bzrlib.shelf_ui import Shelver
         if writer is None:
             writer = bzrlib.option.diff_writer_registry.get()



More information about the bazaar-commits mailing list