comparison hgext/largefiles/lfutil.py @ 47749:068e09499d4e

largefile: use `update_file` instead of `drop` in `synclfdirstate` This is the newer, more semantic API. Differential Revision: https://phab.mercurial-scm.org/D11191
author Pierre-Yves David <pierre-yves.david@octobus.net>
date Mon, 19 Jul 2021 09:14:24 +0200
parents 1f3a87a7a9b1
children 9e9c82d6f96f
comparison
equal deleted inserted replaced
47748:000ea893aad3 47749:068e09499d4e
554 554
555 555
556 def synclfdirstate(repo, lfdirstate, lfile, normallookup): 556 def synclfdirstate(repo, lfdirstate, lfile, normallookup):
557 lfstandin = standin(lfile) 557 lfstandin = standin(lfile)
558 if lfstandin not in repo.dirstate: 558 if lfstandin not in repo.dirstate:
559 lfdirstate.drop(lfile) 559 lfdirstate.update_file(lfile, p1_tracked=False, wc_tracked=False)
560 else: 560 else:
561 stat = repo.dirstate._map[lfstandin] 561 stat = repo.dirstate._map[lfstandin]
562 state, mtime = stat.state, stat.mtime 562 state, mtime = stat.state, stat.mtime
563 if state == b'n': 563 if state == b'n':
564 if normallookup or mtime < 0 or not repo.wvfs.exists(lfile): 564 if normallookup or mtime < 0 or not repo.wvfs.exists(lfile):