Mercurial > hg-stable
changeset 47658:f0cf560475a3
largefiles: replace use of synclfdirstate with drop
Replace calling a complex function with a simple dedicated one
Differential Revision: https://phab.mercurial-scm.org/D11113
author | Pulkit Goyal <7895pulkit@gmail.com> |
---|---|
date | Tue, 13 Jul 2021 14:54:09 +0530 |
parents | 1bad89a67745 |
children | f030c7d22032 |
files | hgext/largefiles/lfcommands.py |
diffstat | 1 files changed, 10 insertions(+), 11 deletions(-) [+] |
line wrap: on
line diff
--- a/hgext/largefiles/lfcommands.py Sat Jul 17 12:47:07 2021 +0200 +++ b/hgext/largefiles/lfcommands.py Tue Jul 13 14:54:09 2021 +0530 @@ -565,20 +565,19 @@ # largefile processing might be slow and be interrupted - be prepared lfdirstate.write() - with lfdirstate.parentchange(): - if lfiles: - lfiles = [f for f in lfiles if f not in dropped] - - for f in dropped: - repo.wvfs.unlinkpath(lfutil.standin(f)) + if lfiles: + lfiles = [f for f in lfiles if f not in dropped] - # This needs to happen for dropped files, otherwise they stay in - # the M state. - lfutil.synclfdirstate(repo, lfdirstate, f, normallookup) + for f in dropped: + repo.wvfs.unlinkpath(lfutil.standin(f)) + # This needs to happen for dropped files, otherwise they stay in + # the M state. + lfdirstate._drop(f) - statuswriter(_(b'getting changed largefiles\n')) - cachelfiles(ui, repo, None, lfiles) + statuswriter(_(b'getting changed largefiles\n')) + cachelfiles(ui, repo, None, lfiles) + with lfdirstate.parentchange(): for lfile in lfiles: update1 = 0