##// END OF EJS Templates
merge: use file size stored in revlog index...
Matt Mackall -
r2898:db397c38 default
parent child Browse files
Show More
@@ -65,6 +65,16 b' class filelog(revlog):'
65 return (m["copy"], bin(m["copyrev"]))
65 return (m["copy"], bin(m["copyrev"]))
66 return False
66 return False
67
67
68 def size(self, rev):
69 """return the size of a given revision"""
70
71 # for revisions with renames, we have to go the slow way
72 node = self.node(rev)
73 if self.renamed(node):
74 return len(self.read(node))
75
76 return revlog.size(self, rev)
77
68 def cmp(self, node, text):
78 def cmp(self, node, text):
69 """compare text with a given file revision"""
79 """compare text with a given file revision"""
70
80
@@ -282,7 +282,8 b' def update(repo, node, branchmerge=False'
282 # of that file some time in the past. Thus our
282 # of that file some time in the past. Thus our
283 # merge will appear as a normal local file
283 # merge will appear as a normal local file
284 # modification.
284 # modification.
285 f_len = len(repo.file(f).read(other))
285 fl = repo.file(f)
286 f_len = fl.size(fl.rev(other))
286 repo.dirstate.update([f], 'n', st_size=f_len, st_mtime=-1)
287 repo.dirstate.update([f], 'n', st_size=f_len, st_mtime=-1)
287
288
288 remove.sort()
289 remove.sort()
General Comments 0
You need to be logged in to leave comments. Login now