Unable to run bzr red-enable

Bug #878132 reported by Casufi
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
bzr-reserved-edit
New
Undecided
Unassigned

Bug Description

D:\SRC>bzr red-enable erwin
Connected (version 2.0, client OpenSSH_5.3p1)
Authentication (publickey) successful!
Secsh channel 1 opened.
Connected (version 2.0, client OpenSSH_5.3p1)
Authentication (publickey) successful!
Secsh channel 1 opened.
Connected (version 2.0, client OpenSSH_5.3p1)
Authentication (publickey) successful!
Secsh channel 1 opened.
bzr: ERROR: exceptions.AttributeError: 'bool' object has no attribute 'encode'

Traceback (most recent call last):
  File "bzrlib\commands.pyo", line 946, in exception_to_return_code
  File "bzrlib\commands.pyo", line 1150, in run_bzr
  File "bzrlib\commands.pyo", line 699, in run_argv_aliases
  File "bzrlib\commands.pyo", line 721, in run
  File "bzrlib\cleanup.pyo", line 135, in run_simple
  File "bzrlib\cleanup.pyo", line 165, in _do_with_cleanups
  File "C:/Program Files/Bazaar/plugins\reserved_edit\__init__.py", line 687, in run
  File "C:/Program Files/Bazaar/plugins\reserved_edit\red.py", line 620, in enable_reserved_edits
  File "bzrlib\config.pyo", line 1404, in set_user_option
  File "bzrlib\config.pyo", line 1706, in set_option
  File "bzrlib\remote.pyo", line 3162, in set_option
  File "bzrlib\remote.pyo", line 3169, in _set_config_option
AttributeError: 'bool' object has no attribute 'encode'

bzr 2.4.1 on python 2.6.6 (Windows-7-6.1.7601-SP1)
arguments: ['C:\\Program Files\\Bazaar\\bzr.EXE', 'red-enable', 'erwin']
plugins: bzrtools[2.4.0], changelog_merge[2.4.1], colo[0.3.1dev],
    explorer[1.2.1], fastimport[0.12.0dev], launchpad[2.4.1], loom[2.2.1dev],
    netrc_credential_store[2.4.1], news_merge[2.4.1], pipeline[1.1.0],
    qbzr[0.21.1], reserved_edit[0.2.0dev], rewrite[0.6.3dev], svn[1.1.0],
    upload[1.0.1dev], xmloutput[0.8.7]
encoding: 'cp1251', fsenc: 'mbcs', lang: None

*** Bazaar has encountered an internal error. This probably indicates a
    bug in Bazaar. You can help us fix it by filing a bug report at
        https://bugs.launchpad.net/bzr/+filebug
    including this traceback and a description of the problem.

Wed 2011-10-19 14:53:24 +0300
0.050 bazaar version: 2.4.1
0.050 bzr arguments: [u'red-enable', u'erwin']
0.078 looking for plugins in C:/Users/v_kotulskiy/AppData/Roaming/bazaar/2.0/plugins
0.078 looking for plugins in C:/Program Files/Bazaar/plugins
0.115 encoding stdout as sys.stdout encoding 'cp866'
0.150 opening working tree 'D:/SRC/erwin'
0.153 opening working tree 'D:/SRC/erwin'
0.205 falling back to default implementation
0.205 failed to load system host keys: [Errno 2] No such file or directory: 'C:\\Users\\v_kotulskiy/.ssh/known_hosts'
[ 1056] 2011-10-19 14:53:24.812 INFO: Connected (version 2.0, client OpenSSH_5.3p1)
0.338 Trying SSH agent key 3CEA27F526B6C9EEFC4643C86A6E1E44
[ 1056] 2011-10-19 14:53:24.977 INFO: Authentication (publickey) successful!
[ 1056] 2011-10-19 14:53:25.362 INFO: Secsh channel 1 opened.
1.170 opening working tree 'D:/SRC/erwin'
1.181 failed to load system host keys: [Errno 2] No such file or directory: 'C:\\Users\\v_kotulskiy/.ssh/known_hosts'
[ 1056] 2011-10-19 14:53:25.789 INFO: Connected (version 2.0, client OpenSSH_5.3p1)
1.317 Trying SSH agent key 3CEA27F526B6C9EEFC4643C86A6E1E44
[ 1056] 2011-10-19 14:53:25.967 INFO: Authentication (publickey) successful!
[ 1056] 2011-10-19 14:53:26.357 INFO: Secsh channel 1 opened.
2.167 opening working tree 'D:/SRC/erwin'
2.178 failed to load system host keys: [Errno 2] No such file or directory: 'C:\\Users\\v_kotulskiy/.ssh/known_hosts'
[ 1056] 2011-10-19 14:53:26.786 INFO: Connected (version 2.0, client OpenSSH_5.3p1)
2.326 Trying SSH agent key 3CEA27F526B6C9EEFC4643C86A6E1E44
[ 1056] 2011-10-19 14:53:27.000 INFO: Authentication (publickey) successful!
[ 1056] 2011-10-19 14:53:27.375 INFO: Secsh channel 1 opened.
3.228 Transferred: 7kB (2.9kB/s r:3kB w:4kB)
3.228 Traceback (most recent call last):
  File "bzrlib\commands.pyo", line 946, in exception_to_return_code
  File "bzrlib\commands.pyo", line 1150, in run_bzr
  File "bzrlib\commands.pyo", line 699, in run_argv_aliases
  File "bzrlib\commands.pyo", line 721, in run
  File "bzrlib\cleanup.pyo", line 135, in run_simple
  File "bzrlib\cleanup.pyo", line 165, in _do_with_cleanups
  File "C:/Program Files/Bazaar/plugins\reserved_edit\__init__.py", line 687, in run
  File "C:/Program Files/Bazaar/plugins\reserved_edit\red.py", line 620, in enable_reserved_edits
  File "bzrlib\config.pyo", line 1404, in set_user_option
  File "bzrlib\config.pyo", line 1706, in set_option
  File "bzrlib\remote.pyo", line 3162, in set_option
  File "bzrlib\remote.pyo", line 3169, in _set_config_option
AttributeError: 'bool' object has no attribute 'encode'

Jelmer Vernooij (jelmer)
affects: bzr → bzr-reserved-edit
Revision history for this message
Alexander Belchenko (bialix) wrote : Re: [Bug 878132] [NEW] Unable to run bzr red-enable

Casufi пишет:
> Public bug reported:
>
> D:\SRC>bzr red-enable erwin
> Connected (version 2.0, client OpenSSH_5.3p1)
> Authentication (publickey) successful!
> Secsh channel 1 opened.
> Connected (version 2.0, client OpenSSH_5.3p1)
> Authentication (publickey) successful!
> Secsh channel 1 opened.
> Connected (version 2.0, client OpenSSH_5.3p1)
> Authentication (publickey) successful!
> Secsh channel 1 opened.
> bzr: ERROR: exceptions.AttributeError: 'bool' object has no attribute 'encode'
>
> Traceback (most recent call last):
> File "bzrlib\commands.pyo", line 946, in exception_to_return_code
> File "bzrlib\commands.pyo", line 1150, in run_bzr
> File "bzrlib\commands.pyo", line 699, in run_argv_aliases
> File "bzrlib\commands.pyo", line 721, in run
> File "bzrlib\cleanup.pyo", line 135, in run_simple
> File "bzrlib\cleanup.pyo", line 165, in _do_with_cleanups
> File "C:/Program Files/Bazaar/plugins\reserved_edit\__init__.py", line 687, in run
> File "C:/Program Files/Bazaar/plugins\reserved_edit\red.py", line 620, in enable_reserved_edits
> File "bzrlib\config.pyo", line 1404, in set_user_option
> File "bzrlib\config.pyo", line 1706, in set_option
> File "bzrlib\remote.pyo", line 3162, in set_option
> File "bzrlib\remote.pyo", line 3169, in _set_config_option
> AttributeError: 'bool' object has no attribute 'encode'

Jelmer, error occurs inside bzrlib, while trying to set the option via
bzr:// protocol. Are you sure that this is plugin problem?

Revision history for this message
Simon Kersey (simon-kersey) wrote :

Hi Casufi,

Where is your shared central repository located? (This is where the reserved edit locks are going to be stored.)

When you run red-enable it attempts to recurse from the working tree to a common place where the reserved edit locks can be stored. It is currently only designed to support shared respositories on a local networked file system - though in principle I think it should be able to support URL based transports there is supposed to be functionality that prevents their use.

As a work around, If you can change directory to the central point where you wish to store your locks then you can use the red-enable --force-central option to stop the command recursing and have it set up reserved edit.

Cheers,
Simon

Revision history for this message
Casufi (vladimirkotulskiy) wrote :

I created local repository using command
bzr checkout bzr+ssh://192.168.2.214/home/dis/orascr/models/trunc/ models and than installed your plugin on my PC

D:\SRC>bzr version
Bazaar (bzr) 2.4.1
  Python interpreter: C:\Program Files\Bazaar\python26.dll 2.6.6
  Python standard library: C:\Program Files\Bazaar\lib\library.zip
  Platform: Windows-7-6.1.7601-SP1
  bzrlib: C:\Program Files\Bazaar\lib\library.zip\bzrlib
  Bazaar configuration: C:\Users\v_kotulskiy\AppData\Roaming\bazaar\2.0
  Bazaar log file: C:\Users\v_kotulskiy\Documents\.bzr.log

Revision history for this message
Simon Kersey (simon-kersey) wrote :

Unfortunately the plugin is attempting to use the bzr+shh transport to update the central repository. The functionality works with file based transport but doesn't appear to with bzr+ssh.

Working with URLs was the next investigation/enhancement to the plug-in.

If you can map the central repository to a network drive and then create your local checkout from this then the plugin should work.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.