Rev 4303: (mbp) fix problem with prompting in break-lock in file:///home/pqm/archives/thelove/bzr/%2Btrunk/
Canonical.com Patch Queue Manager
pqm at pqm.ubuntu.com
Fri Apr 24 19:17:23 BST 2009
At file:///home/pqm/archives/thelove/bzr/%2Btrunk/
------------------------------------------------------------
revno: 4303
revision-id: pqm at pqm.ubuntu.com-20090424181716-vimzfz6s1k4clq42
parent: pqm at pqm.ubuntu.com-20090423204730-kcbq9na0n3zs2y3l
parent: mbp at sourcefrog.net-20090424154933-w74cgi7rdi905026
committer: Canonical.com Patch Queue Manager <pqm at pqm.ubuntu.com>
branch nick: +trunk
timestamp: Fri 2009-04-24 19:17:16 +0100
message:
(mbp) fix problem with prompting in break-lock
modified:
NEWS NEWS-20050323055033-4e00b5db738777ff
bzrlib/tests/test_ui.py test_ui.py-20051130162854-458e667a7414af09
bzrlib/ui/__init__.py ui.py-20050824083933-8cf663c763ba53a9
------------------------------------------------------------
revno: 4300.3.2
revision-id: mbp at sourcefrog.net-20090424154933-w74cgi7rdi905026
parent: mbp at sourcefrog.net-20090424133048-os2wkskng4ma86bm
committer: Martin Pool <mbp at sourcefrog.net>
branch nick: trivial
timestamp: Fri 2009-04-24 16:49:33 +0100
message:
Review tweak to comments
modified:
bzrlib/ui/__init__.py ui.py-20050824083933-8cf663c763ba53a9
------------------------------------------------------------
revno: 4300.3.1
revision-id: mbp at sourcefrog.net-20090424133048-os2wkskng4ma86bm
parent: pqm at pqm.ubuntu.com-20090420092748-tm2cofylpjauo1nw
committer: Martin Pool <mbp at sourcefrog.net>
branch nick: trivial
timestamp: Fri 2009-04-24 14:30:48 +0100
message:
Fix string expansion in TextUIFactory.prompt
modified:
NEWS NEWS-20050323055033-4e00b5db738777ff
bzrlib/tests/test_ui.py test_ui.py-20051130162854-458e667a7414af09
bzrlib/ui/__init__.py ui.py-20050824083933-8cf663c763ba53a9
=== modified file 'NEWS'
--- a/NEWS 2009-04-21 23:54:16 +0000
+++ b/NEWS 2009-04-24 18:17:16 +0000
@@ -38,6 +38,9 @@
* End-Of-Line content filters are now loaded correctly.
(Ian Clatworthy, Brian de Alwis, #355280)
+* Fix TypeError in running ``bzr break-lock`` on some URLs.
+ (Alexander Belchenko, Martin Pool, #365891)
+
* ``bzr send`` works to send emails again using MAPI.
(Neil Martinsen-Burrell, #346998)
=== modified file 'bzrlib/tests/test_ui.py'
--- a/bzrlib/tests/test_ui.py 2009-04-07 12:41:42 +0000
+++ b/bzrlib/tests/test_ui.py 2009-04-24 13:30:48 +0000
@@ -221,6 +221,11 @@
factory = TextUIFactory(None, None, None)
self.assert_get_bool_acceptance_of_user_input(factory)
+ def test_text_factory_prompt(self):
+ # see <https://launchpad.net/bugs/365891>
+ factory = TextUIFactory(None, StringIO(), StringIO())
+ factory.prompt('foo %2e')
+
def test_text_factory_prompts_and_clears(self):
# a get_boolean call should clear the pb before prompting
out = _TTYStringIO()
=== modified file 'bzrlib/ui/__init__.py'
--- a/bzrlib/ui/__init__.py 2009-04-07 11:51:05 +0000
+++ b/bzrlib/ui/__init__.py 2009-04-24 15:49:33 +0000
@@ -217,8 +217,14 @@
return username
def prompt(self, prompt, **kwargs):
- """Emit prompt on the CLI."""
- prompt = prompt % kwargs
+ """Emit prompt on the CLI.
+
+ :param kwargs: Dictionary of arguments to insert into the prompt,
+ to allow UIs to reformat the prompt.
+ """
+ if kwargs:
+ # See <https://launchpad.net/bugs/365891>
+ prompt = prompt % kwargs
prompt = prompt.encode(osutils.get_terminal_encoding(), 'replace')
self.clear_term()
self.stdout.write(prompt)
More information about the bazaar-commits
mailing list