Problem with stat-cache under win32
John A Meinel
john at arbash-meinel.com
Tue May 31 02:54:40 BST 2005
Roncaglia Julien wrote:
> ------------------------------------------------------
> F:\bzr.dev>bzr status
>
> F:\bzr.dev>bzr status
> bzr: 'unicodeescape' codec can't decode bytes in position 3-5: truncated
> \uXXXX
> escape
> at F:\bzr.dev\bzrlib\statcache.py:181 in load_cache()
> see ~/.bzr.log for debug information
>
> F:\bzr.dev>
> ------------------------------------------------------
>
I will give you the summary problem. All internal files for bzr should
use '/' for separating directories. When interacting with the system
they should use the native form (\ for win32, / everywhere else). Right
now not everything is cleaned up under win32 native.
Thanks for the bug report, it gives us one more place that we need to be
aware of. I'm a little surprised that url encoding didn't catch this,
but maybe this is older code that used quoted printable.
> Lines with problem are ones containing things like :
>
> ...6b8ce338662b doc\use-cases.txt
> ...fe7cc1f1c172 bzrlib\xml.py
>
> In fact \uXXXX or \xXX, i dont'k known python well and the code in
> statcache.py seem correct to me, so from where did this problem could come ?
>
> Note: Converting \u to \\u and \x to \\x in the file make bzr to stop
> complain, until the cache is regenerated.
>
> Note: Attached is my .bzr.log file content after one time where it works
> and one where it fail.
The only reason it worked was because it didn't read anything. The code
would also "fail" for cases like c:\new\ (since \n == newline), but you
probably wouldn't notice since having an entry go missing isn't an error.
Anyway, everything that writes to a permanent file probably needs to be
sanitized. Since otherwise you will have all sorts of path separator vs
character escaping issues.
John
=:->
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 251 bytes
Desc: OpenPGP digital signature
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20050530/b0beee95/attachment.pgp
More information about the bazaar
mailing list