comparison hgext/largefiles/lfutil.py @ 47724:b0a39b666e2d

largefile: use `update_file` for `synclfdirstate` "n" case This is the newer, more semantic API. Differential Revision: https://phab.mercurial-scm.org/D11166
author Pierre-Yves David <pierre-yves.david@octobus.net>
date Mon, 19 Jul 2021 05:47:33 +0200
parents 0ed2f74f6e3a
children 1f3a87a7a9b1
comparison
equal deleted inserted replaced
47723:0ed2f74f6e3a 47724:b0a39b666e2d
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):
565 # state 'n' doesn't ensure 'clean' in this case 565 # state 'n' doesn't ensure 'clean' in this case
566 lfdirstate.normallookup(lfile) 566 lfdirstate.update_file(
567 lfile, p1_tracked=True, wc_tracked=True, possibly_dirty=True
568 )
567 else: 569 else:
568 lfdirstate.update_file(lfile, p1_tracked=True, wc_tracked=True) 570 lfdirstate.update_file(lfile, p1_tracked=True, wc_tracked=True)
569 elif state == b'm': 571 elif state == b'm':
570 lfdirstate.normallookup(lfile) 572 lfdirstate.normallookup(lfile)
571 elif state == b'r': 573 elif state == b'r':