Comment 5 for bug 70565

Revision history for this message
Nicholas Allen (nick-allen) wrote :

Hi John,

Sorry for the silly question but in trying to run the patched bzr sources inside the cygwin prompt using the native windows python I am unable to get python to recognize bzr on its path. I have set PYTHONPATH in the system environment variables to include the bzr-0.12 directory and I have even tried setting the environment variable from within cygwin too but it never seems to find the osutils module which is inside the bzr dir.

I do this inside the cygwin prompt:

/c/Python25/Scripts/bzr.bat pull

but it always complains:

bzr: ERROR: exceptions.NameError: global name 'osutils' is not defined

Traceback (most recent call last):
  File "C:\bzr-0.12\bzrlib\commands.py", line 623, in run_bzr_catch_errors
    return run_bzr(argv)
  File "C:\bzr-0.12\bzrlib\commands.py", line 585, in run_bzr
    ret = run(*run_argv)
  File "C:\bzr-0.12\bzrlib\commands.py", line 291, in run_argv_aliases
    return self.run(**all_cmd_args)
  File "C:\bzr-0.12\bzrlib\builtins.py", line 511, in run
    branch_from = Branch.open(location)
  File "C:\bzr-0.12\bzrlib\branch.py", line 118, in open
    control = bzrdir.BzrDir.open(base, _unsupported)
  File "C:\bzr-0.12\bzrlib\bzrdir.py", line 495, in open
    return BzrDir.open_from_transport(t, _unsupported=_unsupported)
  File "C:\bzr-0.12\bzrlib\bzrdir.py", line 504, in open_from_transport
    format = BzrDirFormat.find_format(transport)
  File "C:\bzr-0.12\bzrlib\bzrdir.py", line 1054, in find_format
    return format.probe_transport(transport)
  File "C:\bzr-0.12\bzrlib\bzrdir.py", line 1064, in probe_transport
    format_string = transport.get(".bzr/branch-format").read()
  File "c:\bzr-0.12\bzrlib\transport\ftp.py", line 268, in get
    f = self._get_FTP()
  File "c:\bzr-0.12\bzrlib\transport\ftp.py", line 141, in _get_FTP
    self.is_active)
  File "c:\bzr-0.12\bzrlib\transport\ftp.py", line 72, in _find_FTP
    user=username, host=hostname)
  File "c:\bzr-0.12\bzrlib\ui\text.py", line 86, in get_password
    encoding = osutils.get_terminal_encoding()
NameError: global name 'osutils' is not defined

bzr 0.12.0 on python 2.5.0.final.0 (win32)
arguments: ['c:\\Python25\\Scripts\\bzr', 'pull']