Rev 714: Handle long file names with unicode characters correctly on python2.4 (#129334) in file:///data/jelmer/bzr-svn/0.4/
Jelmer Vernooij
jelmer at samba.org
Mon Sep 24 06:18:11 BST 2007
At file:///data/jelmer/bzr-svn/0.4/
------------------------------------------------------------
revno: 714
revision-id: jelmer at samba.org-20070923234830-4je4o9hw0mxhnzrt
parent: jelmer at samba.org-20070923233618-4s01m5kmnr7a2j89
committer: Jelmer Vernooij <jelmer at samba.org>
branch nick: 0.4
timestamp: Mon 2007-09-24 01:48:30 +0200
message:
Handle long file names with unicode characters correctly on python2.4 (#129334)
modified:
NEWS news-20061231030336-h9fhq245ie0de8bs-1
fileids.py fileids.py-20060714013623-u5iiyqqnko11grcf-1
tests/test_fileids.py test_fileids.py-20060622131341-19gyrlgqy8yl2od5-1
=== modified file 'NEWS'
--- a/NEWS 2007-09-23 23:27:45 +0000
+++ b/NEWS 2007-09-23 23:48:30 +0000
@@ -14,6 +14,10 @@
* Handle NULL_REVISION in SvnRepository.copy_content(). Fixes compatibility
with bzr merge-into.
+ BUG FIXES
+
+ * Handle long file names with unicode characters correctly on python2.4 (#129334)
+
bzr-svn 0.4.3 2007-09-15
PERFORMANCE
=== modified file 'fileids.py'
--- a/fileids.py 2007-08-25 13:55:15 +0000
+++ b/fileids.py 2007-09-23 23:48:30 +0000
@@ -39,7 +39,7 @@
if len(ret) > 150:
ret = "%d@%s:%s;%s" % (revnum, uuid,
escape_svn_path(branch),
- sha.new(path).hexdigest())
+ sha.new(path.encode('utf-8')).hexdigest())
assert isinstance(ret, str)
return osutils.safe_file_id(ret)
=== modified file 'tests/test_fileids.py'
--- a/tests/test_fileids.py 2007-08-03 13:37:37 +0000
+++ b/tests/test_fileids.py 2007-09-23 23:48:30 +0000
@@ -178,6 +178,11 @@
self.assertEqual("2 at uuid:bp;" + sha1(dir+"filename"),
generate_file_id(self.repos, generate_svn_revision_id("uuid", 2, "bp", "bla"), dir+"filename"))
+ def test_generate_file_id_long_nordic(self):
+ dir = "this/is/a" + ("/very"*40) + "/long/path/"
+ self.assertEqual("2 at uuid:bp;" + sha1((dir+u"filename\x2c\x8a").encode('utf-8')),
+ generate_file_id(self.repos, generate_svn_revision_id("uuid", 2, "bp", "bla"), dir+u"filename\x2c\x8a"))
+
def test_generate_revid_special_char_ascii(self):
self.assertEqual("2 at uuid:bp:mypath%2C%8A",
generate_file_id(self.repos, generate_svn_revision_id("uuid", 2, "bp", "bla"), "mypath\x2c\x8a"))
More information about the bazaar-commits
mailing list