comparison hgext/largefiles/lfutil.py @ 31738:068b06b43cdf

largefiles: make copytostore() accept only changectx as the 2nd argument (API) As the name describes, the 2nd argument 'revorctx' of copytostore() can accept non-changectx value, for historical reason, But, since 10561eb97c7f, copyalltostore(), the only one copytostore() client in Mercurial source tree, always passes changectx as 'revorctx'. Therefore, it is reasonable to make copytostore() accept only changectx as the 2nd argument, now.
author FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
date Sat, 01 Apr 2017 02:32:48 +0900
parents c03af6b44846
children 4e446d31a744
comparison
equal deleted inserted replaced
31737:c03af6b44846 31738:068b06b43cdf
243 % (filename, path, gothash)) 243 % (filename, path, gothash))
244 wvfs.unlink(filename) 244 wvfs.unlink(filename)
245 return False 245 return False
246 return True 246 return True
247 247
248 def copytostore(repo, revorctx, file, fstandin): 248 def copytostore(repo, ctx, file, fstandin):
249 wvfs = repo.wvfs 249 wvfs = repo.wvfs
250 hash = readasstandin(repo[revorctx][fstandin]) 250 hash = readasstandin(ctx[fstandin])
251 if instore(repo, hash): 251 if instore(repo, hash):
252 return 252 return
253 if wvfs.exists(file): 253 if wvfs.exists(file):
254 copytostoreabsolute(repo, wvfs.join(file), hash) 254 copytostoreabsolute(repo, wvfs.join(file), hash)
255 else: 255 else: