Rev 4247: Fix bug #355454 by casting to unicode. in file:///net/bigmamac/Volumes/home/vila/src/bzr/bugs/355454-unicode-warning/
Vincent Ladeuil
v.ladeuil+lp at free.fr
Tue Apr 7 16:29:59 BST 2009
At file:///net/bigmamac/Volumes/home/vila/src/bzr/bugs/355454-unicode-warning/
------------------------------------------------------------
revno: 4247
revision-id: v.ladeuil+lp at free.fr-20090407152958-xynpccje2tbcmbh4
parent: pqm at pqm.ubuntu.com-20090406235830-isrefclw112zgeem
committer: Vincent Ladeuil <v.ladeuil+lp at free.fr>
branch nick: 355454-unicode-warning
timestamp: Tue 2009-04-07 17:29:58 +0200
message:
Fix bug #355454 by casting to unicode.
* bzrlib/workingtree_4.py:
(ContentFilterAwareSHA1Provider.sha1,
ContentFilterAwareSHA1Provider.stat_and_sha1): We may be called
with utf8 paths, yet, we need to provide unicode ones to
tree.relpath.
-------------- next part --------------
=== modified file 'NEWS'
--- a/NEWS 2009-04-06 22:20:30 +0000
+++ b/NEWS 2009-04-07 15:29:58 +0000
@@ -127,9 +127,6 @@
Bug Fixes
*********
-* The full test suite is passing again on OSX. Several minor issues (mostly
- test related) have been fixed. (Vincent Ladeuil, #355273).
-
* Authentication plugins now receive all the parameters from the request
itself (aka host, port, realm, path, etc). Previously, only the
authentication section name, username and encoded password were
@@ -145,6 +142,9 @@
* Fixed incorrect "Source format does not support stacking" warning
when pushing to a smart server. (Andrew Bennetts, #334114)
+* Fix 'make check-dist-tarball' failure by converting paths to unicode when
+ needed. (Vincent Ladeuil, #355454)
+
* Fixed "Specified file 'x/y/z' is outside current view: " occurring
on ``bzr add x/y/z`` in formats supporting views when no view is
defined. (Ian Clatworthy, #344708)
@@ -165,6 +165,9 @@
both branches, we know that the trunk for the project can be read too,
so the upgrade will not inconvenience users. (Robert Collins, #345169)
+* The full test suite is passing again on OSX. Several minor issues (mostly
+ test related) have been fixed. (Vincent Ladeuil, #355273).
+
* The GNU Changelog formatter is slightly improved in the case where
the delta is empty, and now correctly claims not to support tags.
(Andrea Bolognani)
=== modified file 'bzrlib/workingtree_4.py'
--- a/bzrlib/workingtree_4.py 2009-03-31 14:13:27 +0000
+++ b/bzrlib/workingtree_4.py 2009-04-07 15:29:58 +0000
@@ -1302,12 +1302,14 @@
def sha1(self, abspath):
"""Return the sha1 of a file given its absolute path."""
- filters = self.tree._content_filter_stack(self.tree.relpath(abspath))
+ filters = self.tree._content_filter_stack(
+ self.tree.relpath(osutils.safe_unicode(abspath)))
return internal_size_sha_file_byname(abspath, filters)[1]
def stat_and_sha1(self, abspath):
"""Return the stat and sha1 of a file given its absolute path."""
- filters = self.tree._content_filter_stack(self.tree.relpath(abspath))
+ filters = self.tree._content_filter_stack(
+ self.tree.relpath(osutils.safe_unicode(abspath)))
file_obj = file(abspath, 'rb', 65000)
try:
statvalue = os.fstat(file_obj.fileno())
More information about the bazaar-commits
mailing list