Mercurial > hg
diff hgext/largefiles/overrides.py @ 48106:82e142b9ad18
dirstate-item: use item's property instead of `state` in largefile
Differential Revision: https://phab.mercurial-scm.org/D11543
author | Pierre-Yves David <pierre-yves.david@octobus.net> |
---|---|
date | Wed, 29 Sep 2021 18:39:02 +0200 |
parents | e4c79a1a0b67 |
children | 5ced12cfa41b |
line wrap: on
line diff
--- a/hgext/largefiles/overrides.py Wed Sep 29 18:37:54 2021 +0200 +++ b/hgext/largefiles/overrides.py Wed Sep 29 18:39:02 2021 +0200 @@ -934,7 +934,7 @@ standin = lfutil.standin(f) if standin in ctx or standin in mctx: matchfiles.append(standin) - elif standin in wctx or lfdirstate[f] == b'r': + elif standin in wctx or lfdirstate.get_entry(f).removed: continue else: matchfiles.append(f) @@ -1591,8 +1591,12 @@ node1, node2, match, ignored, clean, unknown, listsubrepos ) lfdirstate = lfutil.openlfdirstate(ui, repo) - unknown = [f for f in r.unknown if lfdirstate[f] == b'?'] - ignored = [f for f in r.ignored if lfdirstate[f] == b'?'] + unknown = [ + f for f in r.unknown if not lfdirstate.get_entry(f).any_tracked + ] + ignored = [ + f for f in r.ignored if not lfdirstate.get_entry(f).any_tracked + ] return scmutil.status( r.modified, r.added, r.removed, r.deleted, unknown, ignored, r.clean ) @@ -1609,7 +1613,7 @@ orphans = { f for f in repo.dirstate - if lfutil.isstandin(f) and repo.dirstate[f] != b'r' + if lfutil.isstandin(f) and not repo.dirstate.get_entry(f).removed } result = orig(ui, repo, **opts) after = repo.dirstate.parents() @@ -1620,7 +1624,7 @@ for f in repo.dirstate: if lfutil.isstandin(f): orphans.discard(f) - if repo.dirstate[f] == b'r': + if repo.dirstate.get_entry(f).removed: repo.wvfs.unlinkpath(f, ignoremissing=True) elif f in pctx: fctx = pctx[f]