~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: 2007-12-27 15:01:46 UTC
  • mfrom: (3123.6.3 no-inventory2)
  • Revision ID: pqm@pqm.ubuntu.com-20071227150146-08nqv2gvo5e3i1n3
Implement native support for --using (abentley)

Show diffs side-by-side

added added

removed removed

Lines of Context:
627
627
    return ret
628
628
 
629
629
 
 
630
def shlex_split_unicode(unsplit):
 
631
    import shlex
 
632
    return [u.decode('utf-8') for u in shlex.split(unsplit.encode('utf-8'))]
 
633
 
 
634
 
630
635
def get_alias(cmd, config=None):
631
636
    """Return an expanded alias, or None if no alias exists.
632
637
 
642
647
        config = bzrlib.config.GlobalConfig()
643
648
    alias = config.get_alias(cmd)
644
649
    if (alias):
645
 
        import shlex
646
 
        return [a.decode('utf-8') for a in shlex.split(alias.encode('utf-8'))]
 
650
        return shlex_split_unicode(alias)
647
651
    return None
648
652
 
649
653