remote-bzr: delay blob fetching until the very end

Might be more efficient, but the real reason to use the marks will be revealed in upcoming patches. Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Felipe Contreras committed Apr 30, 2013 at 20:09 UTC 181662080098e77a0fd814ffe84be605a058b5d1
1 file changed +5 -3
contrib/remote-helpers/git-remote-bzr
+5 -3
@@ -506,10 +506,12 @@ class CustomTree():
506 return changes
507
508 def get_file_with_stat(self, file_id, path=None):
509 - return (StringIO.StringIO(self.updates[file_id]['data']), None)
509 + mark = self.updates[file_id]['mark']
510 + return (StringIO.StringIO(blob_marks[mark]), None)
511
512 def get_symlink_target(self, file_id):
512 - return self.updates[file_id]['data']
513 + mark = self.updates[file_id]['mark']
514 + return blob_marks[mark]
515
516 def c_style_unescape(string):
517 if string[0] == string[-1] == '"':
@@ -553,7 +555,7 @@ def parse_commit(parser):
555 if parser.check('M'):
556 t, m, mark_ref, path = line.split(' ', 3)
557 mark = int(mark_ref[1:])
556 - f = { 'mode' : m, 'data' : blob_marks[mark] }
558 + f = { 'mode' : m, 'mark' : mark }
559 elif parser.check('D'):
560 t, path = line.split(' ')
561 f = { 'deleted' : True }