I think the encoding needs to be done earlier in the code that builds
up the dirstate; it's probably incorrect to do it here.
On 4/3/08, Matthias Müller-Reineke
<email address hidden> wrote:
> I've posted a merge request with a patch which seems to solve the bug on
> <email address hidden> .
> Unfortunately there was no reply until now.
>
> The following patch seems to solve the bug.
> Unfortunately I don't understand enough about Bazzaar
> * to write a test which reproduces the bug
> * to write a test of this patch
> Dear Edmundo, do you have a clue?
>
> === modified file 'bzrlib/dirstate.py'
> --- bzrlib/dirstate.py 2007-12-19 08:12:34 +0000
> +++ bzrlib/dirstate.py 2008-02-11 10:41:12 +0000
> @@ -1839,7 +1839,7 @@
> """
> output_lines = [DirState.HEADER_FORMAT_3]
> lines.append('') # a final newline
> - inventory_text = '\0\n\0'.join(lines)
> + inventory_text = '\0\n\0'.join(map(osutils.safe_utf8, lines))
> output_lines.append('crc32: %s\n' % (zlib.crc32(inventory_text),))
> # -3, 1 for num parents, 1 for ghosts, 1 for final newline
> num_entries = len(lines)-3
>
> --
> bzr merge - exceptions.UnicodeDecodeError
> https://bugs.launchpad.net/bugs/135320
> You received this bug notification because you are a member of Bazaar
> Developers, which is the registrant for Bazaar.
>
> Status in Bazaar Version Control System: New
>
> Bug description:
> The following occured with my branches. Many files and directories were
> added, moved, removed and renamed in the branches (gv-allgemein was removed
> from this branch but nor from the merge source):
>
> bzr merge sftp://vvw@localhost/u/users/vvw/bzr-rep/vws/
> +N .bzrignore.OTHER
>
> +N gv-allgemein/
> +N gv-allgemein/c-include/
> +N gv-allgemein/c-include/sqlnet.log
> +N gv-allgemein/c-source/
> +N gv-allgemein/c-source/spver_std_ini.c.OTHER
> +N gv-allgemein/pc-include/
> +N gv-allgemein/pc-include/sp011.c2h.OTHER
> +N gv-allgemein/pc-include/sp011.col.OTHER
> +N gv-allgemein/pc-include/sp011.d2h.OTHER
> +N gv-allgemein/pc-include/sp011.dat.OTHER
> ...
> +N src/batch/pdf/AN-Haus-und-Grund-HVK.pdf
> +N src/batch/pdf/AN-Wohn-Mehr-HVK.pdf
> +N src/batch/pdf/HGRUNDHAFT_2007.pdf
> ...
> M src/tech/allgemein/modus.kon
> M src/tech/allgemein/status.kon
> Contents conflict in .bzrignore
> Conflict adding files to gv-allgemein. Created directory.
> Conflict because gv-allgemein is not versioned, but has versioned children.
> Versioned directory.
> Conflict adding files to gv-allgemein/c-include. Created directory.
> Conflict because gv-allgemein/c-include is not versioned, but has versioned
> children. Versioned directory.
> Conflict adding files to gv-allgemein/c-source. Created directory.
> Conflict because gv-allgemein/c-source is not versioned, but has versioned
> children. Versioned directory.
> Contents conflict in gv-allgemein/c-source/spver_std_ini.c
> Conflict adding files to gv-allgemein/pc-include. Created directory.
> Conflict because gv-allgemein/pc-include is not versioned, but has versioned
> children. Versioned directory.
> Contents conflict in gv-allgemein/pc-include/sp011.c2h
> Contents conflict in gv-allgemein/pc-include/sp011.col
> ...
> Text conflict in src/geschaeft/allgemein/vws_beilage_ms.ext
> Text conflict in src/geschaeft/db/brdat_gt.pc
> 75 conflicts encountered.
>
> bzr: ERROR: exceptions.UnicodeDecodeError: 'ascii' codec can't decode byte
> 0xc3 in position 29: ordinal not in range(128)
>
> Traceback (most recent call last):
> File "/u/users/mueller/lib/python/bzrlib/commands.py", line 817, in
> run_bzr_catch_errors
> return run_bzr(argv)
> File "/u/users/mueller/lib/python/bzrlib/commands.py", line 779, in
> run_bzr
> ret = run(*run_argv)
> File "/u/users/mueller/lib/python/bzrlib/commands.py", line 477, in
> run_argv_aliases
> return self.run(**all_cmd_args)
> File "/u/users/mueller/lib/python/bzrlib/builtins.py", line 2770, in run
> cleanup()
> File "/u/users/mueller/lib/python/bzrlib/workingtree_4.py", line 1125, in
> unlock
> self.flush()
> File "/u/users/mueller/lib/python/bzrlib/workingtree_4.py", line 312, in
> flush
> self.current_dirstate().save()
> File "/u/users/mueller/lib/python/bzrlib/dirstate.py", line 1639, in save
> self._state_file.writelines(self.get_lines())
> File "/u/users/mueller/lib/python/bzrlib/dirstate.py", line 1228, in
> get_lines
> return self._get_output_lines(lines)
> File "/u/users/mueller/lib/python/bzrlib/dirstate.py", line 1521, in
> _get_output_lines
> inventory_text = '\0\n\0'.join(lines)
> UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 29:
> ordinal not in range(128)
>
> bzr 0.90.0candidate0 on python 2.5.0.final.0 (linux2)
> arguments: ['/u/users/mueller/bin/bzr', 'merge',
> 'sftp://vvw@localhost/u/users/vvw/bzr-rep/vws/']
>
> ** please send this report to <email address hidden>
> /u/users/mueller/lib/python/bzrlib/lockable_files.py:110: UserWarning: file
> group LockableFiles(<bzrlib.transport.local.LocalTransport
> url=file:///u/users/mueller/bzr_diagnose/C%2B%2B/.bzr/checkout/>) was not
> explicitly unlocked
> warn("file group %r was not explicitly unlocked" % self)
> /u/users/mueller/lib/python/bzrlib/lock.py:79: UserWarning: lock on <open
> file u'/u/users/mueller/bzr_diagnose/C++/.bzr/checkout/dirstate', mode 'rb+'
> at 0x40642f98> not released
> warn("lock on %r not released" % self.f)
>
>
I think the encoding needs to be done earlier in the code that builds
up the dirstate; it's probably incorrect to do it here.
On 4/3/08, Matthias Müller-Reineke dirstate. py' HEADER_ FORMAT_ 3] .join(lines) .join(map( osutils. safe_utf8, lines)) lines.append( 'crc32: %s\n' % (zlib.crc32( inventory_ text),) ) UnicodeDecodeEr ror /bugs.launchpad .net/bugs/ 135320 vvw@localhost/ u/users/ vvw/bzr- rep/vws/ c-include/ c-include/ sqlnet. log c-source/ c-source/ spver_std_ ini.c.OTHER pc-include/ pc-include/ sp011.c2h. OTHER pc-include/ sp011.col. OTHER pc-include/ sp011.d2h. OTHER pc-include/ sp011.dat. OTHER pdf/AN- Haus-und- Grund-HVK. pdf pdf/AN- Wohn-Mehr- HVK.pdf pdf/HGRUNDHAFT_ 2007.pdf allgemein/ modus.kon allgemein/ status. kon c-include. Created directory. c-include is not versioned, but has versioned c-source. Created directory. c-source is not versioned, but has versioned c-source/ spver_std_ ini.c pc-include. Created directory. pc-include is not versioned, but has versioned pc-include/ sp011.c2h pc-include/ sp011.col allgemein/ vws_beilage_ ms.ext db/brdat_ gt.pc UnicodeDecodeEr ror: 'ascii' codec can't decode byte mueller/ lib/python/ bzrlib/ commands. py", line 817, in catch_errors mueller/ lib/python/ bzrlib/ commands. py", line 779, in mueller/ lib/python/ bzrlib/ commands. py", line 477, in **all_cmd_ args) mueller/ lib/python/ bzrlib/ builtins. py", line 2770, in run mueller/ lib/python/ bzrlib/ workingtree_ 4.py", line 1125, in mueller/ lib/python/ bzrlib/ workingtree_ 4.py", line 312, in dirstate( ).save( ) mueller/ lib/python/ bzrlib/ dirstate. py", line 1639, in save file.writelines (self.get_ lines() ) mueller/ lib/python/ bzrlib/ dirstate. py", line 1228, in output_ lines(lines) mueller/ lib/python/ bzrlib/ dirstate. py", line 1521, in .join(lines) mueller/ bin/bzr' , 'merge', vvw@localhost/ u/users/ vvw/bzr- rep/vws/ '] mueller/ lib/python/ bzrlib/ lockable_ files.py: 110: UserWarning: file <bzrlib. transport. local.LocalTran sport ///u/users/ mueller/ bzr_diagnose/ C%2B%2B/ .bzr/checkout/ >) was not mueller/ lib/python/ bzrlib/ lock.py: 79: UserWarning: lock on <open mueller/ bzr_diagnose/ C++/.bzr/ checkout/ dirstate' , mode 'rb+'
<email address hidden> wrote:
> I've posted a merge request with a patch which seems to solve the bug on
> <email address hidden> .
> Unfortunately there was no reply until now.
>
> The following patch seems to solve the bug.
> Unfortunately I don't understand enough about Bazzaar
> * to write a test which reproduces the bug
> * to write a test of this patch
> Dear Edmundo, do you have a clue?
>
> === modified file 'bzrlib/
> --- bzrlib/dirstate.py 2007-12-19 08:12:34 +0000
> +++ bzrlib/dirstate.py 2008-02-11 10:41:12 +0000
> @@ -1839,7 +1839,7 @@
> """
> output_lines = [DirState.
> lines.append('') # a final newline
> - inventory_text = '\0\n\0'
> + inventory_text = '\0\n\0'
> output_
> # -3, 1 for num parents, 1 for ghosts, 1 for final newline
> num_entries = len(lines)-3
>
> --
> bzr merge - exceptions.
> https:/
> You received this bug notification because you are a member of Bazaar
> Developers, which is the registrant for Bazaar.
>
> Status in Bazaar Version Control System: New
>
> Bug description:
> The following occured with my branches. Many files and directories were
> added, moved, removed and renamed in the branches (gv-allgemein was removed
> from this branch but nor from the merge source):
>
> bzr merge sftp://
> +N .bzrignore.OTHER
>
> +N gv-allgemein/
> +N gv-allgemein/
> +N gv-allgemein/
> +N gv-allgemein/
> +N gv-allgemein/
> +N gv-allgemein/
> +N gv-allgemein/
> +N gv-allgemein/
> +N gv-allgemein/
> +N gv-allgemein/
> ...
> +N src/batch/
> +N src/batch/
> +N src/batch/
> ...
> M src/tech/
> M src/tech/
> Contents conflict in .bzrignore
> Conflict adding files to gv-allgemein. Created directory.
> Conflict because gv-allgemein is not versioned, but has versioned children.
> Versioned directory.
> Conflict adding files to gv-allgemein/
> Conflict because gv-allgemein/
> children. Versioned directory.
> Conflict adding files to gv-allgemein/
> Conflict because gv-allgemein/
> children. Versioned directory.
> Contents conflict in gv-allgemein/
> Conflict adding files to gv-allgemein/
> Conflict because gv-allgemein/
> children. Versioned directory.
> Contents conflict in gv-allgemein/
> Contents conflict in gv-allgemein/
> ...
> Text conflict in src/geschaeft/
> Text conflict in src/geschaeft/
> 75 conflicts encountered.
>
> bzr: ERROR: exceptions.
> 0xc3 in position 29: ordinal not in range(128)
>
> Traceback (most recent call last):
> File "/u/users/
> run_bzr_
> return run_bzr(argv)
> File "/u/users/
> run_bzr
> ret = run(*run_argv)
> File "/u/users/
> run_argv_aliases
> return self.run(
> File "/u/users/
> cleanup()
> File "/u/users/
> unlock
> self.flush()
> File "/u/users/
> flush
> self.current_
> File "/u/users/
> self._state_
> File "/u/users/
> get_lines
> return self._get_
> File "/u/users/
> _get_output_lines
> inventory_text = '\0\n\0'
> UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 29:
> ordinal not in range(128)
>
> bzr 0.90.0candidate0 on python 2.5.0.final.0 (linux2)
> arguments: ['/u/users/
> 'sftp://
>
> ** please send this report to <email address hidden>
> /u/users/
> group LockableFiles(
> url=file:
> explicitly unlocked
> warn("file group %r was not explicitly unlocked" % self)
> /u/users/
> file u'/u/users/
> at 0x40642f98> not released
> warn("lock on %r not released" % self.f)
>
>
-- launchpad. net/~mbp/>
Martin <http://