Skip to content

Commit 1816620

Browse files
felipecgitster
authored andcommitted
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 <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent c80f4c7 commit 1816620

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

contrib/remote-helpers/git-remote-bzr

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -506,10 +506,12 @@ class CustomTree():
506506
return changes
507507

508508
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)
510511

511512
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]
513515

514516
def c_style_unescape(string):
515517
if string[0] == string[-1] == '"':
@@ -553,7 +555,7 @@ def parse_commit(parser):
553555
if parser.check('M'):
554556
t, m, mark_ref, path = line.split(' ', 3)
555557
mark = int(mark_ref[1:])
556-
f = { 'mode' : m, 'data' : blob_marks[mark] }
558+
f = { 'mode' : m, 'mark' : mark }
557559
elif parser.check('D'):
558560
t, path = line.split(' ')
559561
f = { 'deleted' : True }

0 commit comments

Comments
 (0)