Rev 4248: Fixed as per John's review feedback. in file:///net/bigmamac/Volumes/home/vila/src/bzr/bugs/355454-unicode-warning/
Vincent Ladeuil
v.ladeuil+lp at free.fr
Tue Apr 7 18:01:04 BST 2009
At file:///net/bigmamac/Volumes/home/vila/src/bzr/bugs/355454-unicode-warning/
------------------------------------------------------------
revno: 4248
revision-id: v.ladeuil+lp at free.fr-20090407170102-j5utbh39e3z52oiq
parent: v.ladeuil+lp at free.fr-20090407152958-xynpccje2tbcmbh4
committer: Vincent Ladeuil <v.ladeuil+lp at free.fr>
branch nick: 355454-unicode-warning
timestamp: Tue 2009-04-07 19:01:02 +0200
message:
Fixed as per John's review feedback.
* bzrlib/workingtree_4.py:
(ContentFilterAwareSHA1Provider.sha1,
ContentFilterAwareSHA1Provider.stat_and_sha1): Refers to base
class.
* bzrlib/dirstate.py:
(SHA1Provider.sha1, SHA1Provider.stat_and_sha1): Update doc string.
-------------- next part --------------
=== modified file 'bzrlib/dirstate.py'
--- a/bzrlib/dirstate.py 2009-03-23 14:59:43 +0000
+++ b/bzrlib/dirstate.py 2009-04-07 17:01:02 +0000
@@ -267,12 +267,19 @@
"""An interface for getting sha1s of a file."""
def sha1(self, abspath):
- """Return the sha1 of a file given its absolute path."""
+ """Return the sha1 of a file given its absolute path.
+
+ :param abspath: May be a filesystem encoded absolute path
+ or a unicode path.
+ """
raise NotImplementedError(self.sha1)
def stat_and_sha1(self, abspath):
"""Return the stat and sha1 of a file given its absolute path.
+ :param abspath: May be a filesystem encoded absolute path
+ or a unicode path.
+
Note: the stat should be the stat of the physical file
while the sha may be the sha of its canonical content.
"""
=== modified file 'bzrlib/workingtree_4.py'
--- a/bzrlib/workingtree_4.py 2009-04-07 15:29:58 +0000
+++ b/bzrlib/workingtree_4.py 2009-04-07 17:01:02 +0000
@@ -1301,13 +1301,13 @@
self.tree = tree
def sha1(self, abspath):
- """Return the sha1 of a file given its absolute path."""
+ """See dirstate.SHA1Provider.sha1()."""
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."""
+ """See dirstate.SHA1Provider.stat_and_sha1()."""
filters = self.tree._content_filter_stack(
self.tree.relpath(osutils.safe_unicode(abspath)))
file_obj = file(abspath, 'rb', 65000)
More information about the bazaar-commits
mailing list