Merge lp:~jr/bzr-explorer/781204-fix-deprecated-usage into lp:bzr-explorer

Proposed by Jonathan Riddell
Status: Merged
Merged at revision: 513
Proposed branch: lp:~jr/bzr-explorer/781204-fix-deprecated-usage
Merge into: lp:bzr-explorer
Diff against target: 43 lines (+4/-4)
2 files modified
lib/app_suite.py (+2/-2)
lib/explorer.py (+2/-2)
To merge this branch: bzr merge lp:~jr/bzr-explorer/781204-fix-deprecated-usage
Reviewer Review Type Date Requested Status
Martin Pool (community) Approve
Review via email: mp+63398@code.launchpad.net

Description of the change

Use cmdline.split() instead

To post a comment you must log in.
Revision history for this message
Martin Pool (mbp) :
review: Approve
Revision history for this message
John A Meinel (jameinel) wrote :

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 6/3/2011 5:41 PM, Jonathan Riddell wrote:
> Jonathan Riddell has proposed merging lp:~jr/bzr-explorer/781204-fix-deprecated-usage into lp:bzr-explorer.
>
> Requested reviews:
> Bazaar Explorer Developers (bzr-explorer-dev)
> Related bugs:
> Bug #781204 in Bazaar Explorer: "deprecated API usage"
> https://bugs.launchpad.net/bzr-explorer/+bug/781204
>
> For more details, see:
> https://code.launchpad.net/~jr/bzr-explorer/781204-fix-deprecated-usage/+merge/63398
>
> Use cmdline.split() instead
>

Is there a version compatibility concern here? I'm not positive, but it
looks like these sort of commands showed up around 2.1/2.2. Which could
be old enough qbzr doesn't care.

The changes are certainly good vs bzr trunk.

John
=:->
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Cygwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk3s4WsACgkQJdeBCYSNAANlKQCgvpMY/XqvPf8y9irepPLDg5oH
Z0EAnA92lw5RMSx9mgQcuu16M8yaoZ9K
=Uwue
-----END PGP SIGNATURE-----

Revision history for this message
Jeffrey Glenn (jeff-f) wrote :

Thank you for your solution and diff. That is what I needed to fix my error (as described in Bug #1114680):

bzr: ERROR: exceptions.ImportError: cannot import name shlex_split_unicode

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'lib/app_suite.py'
2--- lib/app_suite.py 2010-08-09 18:56:20 +0000
3+++ lib/app_suite.py 2011-06-03 15:41:16 +0000
4@@ -33,7 +33,7 @@
5 """
6
7 from bzrlib import registry
8-from bzrlib.commands import shlex_split_unicode
9+from bzrlib.cmdline import split
10
11
12 _PERMITTED_PLACEHOLDERS = [
13@@ -147,7 +147,7 @@
14
15 def command_to_args(template, context):
16 """Convert a command template and context to a list of arguments."""
17- return shlex_split_unicode(command_to_expanded(template, context))
18+ return split(command_to_expanded(template, context))
19
20
21 # The registry of suites
22
23=== modified file 'lib/explorer.py'
24--- lib/explorer.py 2011-05-10 13:14:41 +0000
25+++ lib/explorer.py 2011-06-03 15:41:16 +0000
26@@ -27,7 +27,7 @@
27 trace,
28 urlutils,
29 )
30-from bzrlib.commands import shlex_split_unicode
31+from bzrlib.cmdline import split
32 from bzrlib.plugins import explorer
33 from bzrlib.plugins.explorer.lib import (
34 accessories_dialog,
35@@ -119,7 +119,7 @@
36 # Map xx.app -> "open -a /Applications/xx.app"
37 if command.endswith(".app") and not command.startswith("open"):
38 command = 'open -a "%s"' % command
39- return shlex_split_unicode(command)
40+ return split(command)
41
42
43 class QExplorerMainWindow(QBzrWindow):

Subscribers

People subscribed via source and target branches