Ticket #811: fix_blackmatch-2.patch.txt

File fix_blackmatch-2.patch.txt, 1.8 KB (added by francois, at 2009-12-29T23:59:02Z)
Line 
1--- old-tahoe/contrib/fuse/impl_c/blackmatch.py 2009-12-30 00:49:30.000000000 +0100
2+++ new-tahoe/contrib/fuse/impl_c/blackmatch.py 2009-12-30 00:49:30.000000000 +0100
3@@ -1,7 +1,7 @@
4 #!/usr/bin/env python
5 
6 #-----------------------------------------------------------------------------------------------
7-from allmydata.uri import CHKFileURI, NewDirectoryURI, LiteralFileURI
8+from allmydata.uri import CHKFileURI, DirectoryURI, LiteralFileURI
9 from allmydata.scripts.common_http import do_http as do_http_req
10 from allmydata.util.hashutil import tagged_hash
11 from allmydata.util.assertutil import precondition
12@@ -1093,7 +1093,7 @@
13 
14         cachedir = os.path.expanduser(os.path.join(nodedir, '_cache'))
15         self.cache = FileCache(nodeurl, cachedir)
16-        ro_uri = NewDirectoryURI.init_from_string(self.root_uri).get_readonly()
17+        ro_uri = DirectoryURI.init_from_string(self.root_uri).get_readonly()
18         self.root = Directory(self, ro_uri, self.root_uri)
19         self.root.maybe_refresh('<root>')
20 
21@@ -1183,7 +1183,7 @@
22         url = self.compose_url("uri?t=mkdir")
23         new_dir_cap = do_http('PUT', url)
24 
25-        ro_uri = NewDirectoryURI.init_from_string(new_dir_cap).get_readonly()
26+        ro_uri = DirectoryURI.init_from_string(new_dir_cap).get_readonly()
27         child = Directory(self, ro_uri, new_dir_cap)
28         parent.add_child(name, child, {})
29 
30@@ -1599,7 +1599,7 @@
31         root_name = 'uri_' + base32.b2a(tagged_hash('root_name', root_uri))[:12]
32         # test the uri for structural validity:
33         try:
34-            NewDirectoryURI.init_from_string(root_uri)
35+            DirectoryURI.init_from_string(root_uri)
36         except:
37             raise usage.error('root-uri must be a valid directory uri (not %r)' % (root_uri,))
38     else: