Mercurial > hg-stable
changeset 50105:088ee6adfb09
largefiles: rely on main scoping for writing dirstate in `mergeupdate`
Yeah, cleaner code.
author | Pierre-Yves David <pierre-yves.david@octobus.net> |
---|---|
date | Sun, 05 Feb 2023 12:05:23 +0100 |
parents | c3c8ac540513 |
children | 22cd517bc6b0 |
files | hgext/largefiles/overrides.py |
diffstat | 1 files changed, 2 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/hgext/largefiles/overrides.py Sat Feb 04 16:54:46 2023 +0100 +++ b/hgext/largefiles/overrides.py Sun Feb 05 12:05:23 2023 +0100 @@ -1830,7 +1830,8 @@ raise error.ProgrammingError( b'largefiles is not compatible with in-memory merge' ) - with lfdirstate.changing_parents(repo): + with repo.dirstate.changing_parents(repo): + lfdirstate = lfutil.openlfdirstate(repo.ui, repo) result = orig(repo, node, branchmerge, force, *args, **kwargs) newstandins = lfutil.getstandinsstate(repo) @@ -1840,7 +1841,6 @@ # all the ones that didn't change as clean for lfile in oldclean.difference(filelist): lfdirstate.update_file(lfile, p1_tracked=True, wc_tracked=True) - lfdirstate.write(repo.currenttransaction()) if branchmerge or force or partial: filelist.extend(s.deleted + s.removed)