~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/win32utils.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2009-12-18 09:05:13 UTC
  • mfrom: (4505.6.30 lp-login-oauth-2)
  • Revision ID: pqm@pqm.ubuntu.com-20091218090513-kzwkjw7rdf7bahqi
(jml) Add an lp-mirror command to request that Launchpad mirror a
        branch now. Add an API for interacting with launchpadlib using Bazaar.

Show diffs side-by-side

added added

removed removed

Lines of Context:
22
22
import glob
23
23
import os
24
24
import re
25
 
import shlex
26
25
import struct
27
 
import StringIO
28
26
import sys
29
27
 
30
28
 
392
390
 
393
391
 
394
392
def _ensure_unicode(s):
395
 
    from bzrlib import osutils
396
393
    if s and type(s) != unicode:
397
394
        from bzrlib import osutils
398
395
        s = s.decode(osutils.get_user_encoding())
648
645
        prototype = ctypes.WINFUNCTYPE(POINTER(LPCWSTR), LPCWSTR, POINTER(INT))
649
646
        command_line = GetCommandLine()
650
647
        # Skip the first argument, since we only care about parameters
651
 
        argv = _command_line_to_argv(GetCommandLine())[1:]
 
648
        argv = _command_line_to_argv(command_line)[1:]
652
649
        if getattr(sys, 'frozen', None) is None:
653
650
            # Invoked via 'python.exe' which takes the form:
654
651
            #   python.exe [PYTHON_OPTIONS] C:\Path\bzr [BZR_OPTIONS]