##// END OF EJS Templates
largefiles: migrate to new method for getting copy info...
Martin von Zweigbergk -
r41941:a86e2200 default
parent child Browse files
Show More
@@ -207,12 +207,12 b' def _lfconvert_addchangeset(rsrc, rdst, '
207 # the largefile-ness of its predecessor
207 # the largefile-ness of its predecessor
208 if f in ctx.manifest():
208 if f in ctx.manifest():
209 fctx = ctx.filectx(f)
209 fctx = ctx.filectx(f)
210 renamed = fctx.renamed()
210 renamed = fctx.copysource()
211 if renamed is None:
211 if renamed is None:
212 # the code below assumes renamed to be a boolean or a list
212 # the code below assumes renamed to be a boolean or a list
213 # and won't quite work with the value None
213 # and won't quite work with the value None
214 renamed = False
214 renamed = False
215 renamedlfile = renamed and renamed[0] in lfiles
215 renamedlfile = renamed and renamed in lfiles
216 islfile |= renamedlfile
216 islfile |= renamedlfile
217 if 'l' in fctx.flags():
217 if 'l' in fctx.flags():
218 if renamedlfile:
218 if renamedlfile:
@@ -232,8 +232,8 b' def _lfconvert_addchangeset(rsrc, rdst, '
232 if f in ctx.manifest():
232 if f in ctx.manifest():
233 fctx = ctx.filectx(f)
233 fctx = ctx.filectx(f)
234 if 'l' in fctx.flags():
234 if 'l' in fctx.flags():
235 renamed = fctx.renamed()
235 renamed = fctx.copysource()
236 if renamed and renamed[0] in lfiles:
236 if renamed and renamed in lfiles:
237 raise error.Abort(_('largefile %s becomes symlink') % f)
237 raise error.Abort(_('largefile %s becomes symlink') % f)
238
238
239 # largefile was modified, update standins
239 # largefile was modified, update standins
@@ -259,11 +259,11 b' def _lfconvert_addchangeset(rsrc, rdst, '
259 fctx = ctx.filectx(srcfname)
259 fctx = ctx.filectx(srcfname)
260 except error.LookupError:
260 except error.LookupError:
261 return None
261 return None
262 renamed = fctx.renamed()
262 renamed = fctx.copysource()
263 if renamed:
263 if renamed:
264 # standin is always a largefile because largefile-ness
264 # standin is always a largefile because largefile-ness
265 # doesn't change after rename or copy
265 # doesn't change after rename or copy
266 renamed = lfutil.standin(renamed[0])
266 renamed = lfutil.standin(renamed)
267
267
268 return context.memfilectx(repo, memctx, f,
268 return context.memfilectx(repo, memctx, f,
269 lfiletohash[srcfname] + '\n',
269 lfiletohash[srcfname] + '\n',
@@ -308,9 +308,7 b' def _getnormalcontext(repo, ctx, f, revm'
308 fctx = ctx.filectx(f)
308 fctx = ctx.filectx(f)
309 except error.LookupError:
309 except error.LookupError:
310 return None
310 return None
311 renamed = fctx.renamed()
311 renamed = fctx.copysource()
312 if renamed:
313 renamed = renamed[0]
314
312
315 data = fctx.data()
313 data = fctx.data()
316 if f == '.hgtags':
314 if f == '.hgtags':
General Comments 0
You need to be logged in to leave comments. Login now