10813: Added only_committed argument to ArvFile.manifest_text() method to maintain...
[arvados.git] / sdk / python / arvados / arvfile.py
index 8446fb6a2981c9ee6d02404a4a846a3a2daf8d38..edeb910570ed80af8d1b45589cc252f7b58e718f 100644 (file)
@@ -1070,12 +1070,15 @@ class ArvadosFile(object):
             return 0
 
     @synchronized
-    def manifest_text(self, stream_name=".", portable_locators=False, normalize=False):
+    def manifest_text(self, stream_name=".", portable_locators=False,
+                      normalize=False, only_committed=False):
         buf = ""
         filestream = []
         for segment in self.segments:
             loc = segment.locator
-            if loc.startswith("bufferblock"):
+            if self.parent._my_block_manager().is_bufferblock(loc):
+                if only_committed:
+                    continue
                 loc = self._bufferblocks[loc].calculate_locator()
             if portable_locators:
                 loc = KeepLocator(loc).stripped()