~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/commands.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2010-02-18 03:02:28 UTC
  • mfrom: (5037.3.2 integration)
  • Revision ID: pqm@pqm.ubuntu.com-20100218030228-dtbmt8pdtf21ndo7
(mbp, for doxx) better win32 cmdline splitter

Show diffs side-by-side

added added

removed removed

Lines of Context:
41
41
import bzrlib
42
42
from bzrlib import (
43
43
    cleanup,
 
44
    cmdline,
44
45
    debug,
45
46
    errors,
46
47
    option,
873
874
    return ret
874
875
 
875
876
 
876
 
def shlex_split_unicode(unsplit):
877
 
    import shlex
878
 
    return [u.decode('utf-8') for u in shlex.split(unsplit.encode('utf-8'))]
879
 
 
880
 
 
881
877
def get_alias(cmd, config=None):
882
878
    """Return an expanded alias, or None if no alias exists.
883
879
 
893
889
        config = bzrlib.config.GlobalConfig()
894
890
    alias = config.get_alias(cmd)
895
891
    if (alias):
896
 
        return shlex_split_unicode(alias)
 
892
        return cmdline.split(alias)
897
893
    return None
898
894
 
899
895