comparison hgext/largefiles/lfcommands.py @ 31735:3e37b479ce2f

largefiles: replace readstandin() by readasstandin() These code paths already (or should, for efficiency at repetition) know the target changectx and path of standin file.
author FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
date Sat, 01 Apr 2017 02:32:47 +0900
parents 1af4a1641bdb
children a40e979b9d97
comparison
equal deleted inserted replaced
31734:44ff5e4ffc8c 31735:3e37b479ce2f
472 if (wvfs.exists(relstandinorig) and 472 if (wvfs.exists(relstandinorig) and
473 wvfs.exists(rellfile)): 473 wvfs.exists(rellfile)):
474 shutil.copyfile(wvfs.join(rellfile), 474 shutil.copyfile(wvfs.join(rellfile),
475 wvfs.join(rellfileorig)) 475 wvfs.join(rellfileorig))
476 wvfs.unlinkpath(relstandinorig) 476 wvfs.unlinkpath(relstandinorig)
477 expecthash = lfutil.readstandin(repo, lfile) 477 expecthash = lfutil.readasstandin(wctx[relstandin])
478 if expecthash != '': 478 if expecthash != '':
479 if lfile not in wctx: # not switched to normal file 479 if lfile not in wctx: # not switched to normal file
480 wvfs.unlinkpath(rellfile, ignoremissing=True) 480 wvfs.unlinkpath(rellfile, ignoremissing=True)
481 # use normallookup() to allocate an entry in largefiles 481 # use normallookup() to allocate an entry in largefiles
482 # dirstate to prevent lfilesrepo.status() from reporting 482 # dirstate to prevent lfilesrepo.status() from reporting