[ARVADOS] updated: 30b6c5a0f8dc91c76ca30ba4b5263b7eab858bdb

git at public.curoverse.com git at public.curoverse.com
Thu May 29 12:58:44 EDT 2014


Summary of changes:
 sdk/python/arvados/collection.py | 12 +++---------
 1 file changed, 3 insertions(+), 9 deletions(-)

       via  30b6c5a0f8dc91c76ca30ba4b5263b7eab858bdb (commit)
      from  46460c9615f07184ecb9917e4c948635712859da (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.


commit 30b6c5a0f8dc91c76ca30ba4b5263b7eab858bdb
Author: Tim Pierce <twp at curoverse.com>
Date:   Thu May 29 12:56:01 2014 -0400

    2755: code review.
    
    * CollectionWriter does not cache manifest_text, and recomputes it each
      time it is asked.
    
    * Manifest uuid is computed from a manifest that has been stripped of
      permission hints, but not any other kind of locator hint.

diff --git a/sdk/python/arvados/collection.py b/sdk/python/arvados/collection.py
index ab0b028..264a24c 100644
--- a/sdk/python/arvados/collection.py
+++ b/sdk/python/arvados/collection.py
@@ -156,7 +156,6 @@ class CollectionWriter(object):
         self._current_stream_name = '.'
         self._current_file_name = None
         self._current_file_pos = 0
-        self._manifest_text = ''
         self._finished_streams = []
 
     def __enter__(self):
@@ -279,25 +278,20 @@ class CollectionWriter(object):
 
     def stripped_manifest(self):
         """
-        Return the manifest for the current collection with all hints
-        (other than size) removed from the locators in the manifest.
+        Return the manifest for the current collection with all permission
+        hints removed from the locators in the manifest.
         """
         raw = self.manifest_text()
         clean = ''
         for line in raw.split("\n"):
             fields = line.split()
             if len(fields) > 0:
-                locators = [ re.sub(r'\+[A-Z][a-z0-9 at _-]+', '', x)
+                locators = [ re.sub(r'\+A[a-z0-9 at _-]+', '', x)
                              for x in fields[1:-1] ]
                 clean += fields[0] + ' ' + ' '.join(locators) + ' ' + fields[-1] + "\n"
         return clean
         
     def manifest_text(self):
-        if self._manifest_text == '':
-            self._manifest_text = self.generate_manifest()
-        return self._manifest_text
-
-    def generate_manifest(self):
         self.finish_current_stream()
         manifest = ''
 

-----------------------------------------------------------------------


hooks/post-receive
-- 




More information about the arvados-commits mailing list