Mercurial > hg
comparison hgext/largefiles/overrides.py @ 50138:270dc01481af
large-files: use `running_status` in `overriderevert`
This is the way
author | Pierre-Yves David <pierre-yves.david@octobus.net> |
---|---|
date | Wed, 22 Feb 2023 00:22:16 +0100 |
parents | 5a0c1d70ebcf |
children | ce657d7b7c39 |
comparison
equal
deleted
inserted
replaced
50137:302772099ac4 | 50138:270dc01481af |
---|---|
918 @eh.wrapfunction(cmdutil, b'revert') | 918 @eh.wrapfunction(cmdutil, b'revert') |
919 def overriderevert(orig, ui, repo, ctx, *pats, **opts): | 919 def overriderevert(orig, ui, repo, ctx, *pats, **opts): |
920 # Because we put the standins in a bad state (by updating them) | 920 # Because we put the standins in a bad state (by updating them) |
921 # and then return them to a correct state we need to lock to | 921 # and then return them to a correct state we need to lock to |
922 # prevent others from changing them in their incorrect state. | 922 # prevent others from changing them in their incorrect state. |
923 with repo.wlock(): | 923 with repo.wlock(), repo.dirstate.running_status(repo): |
924 lfdirstate = lfutil.openlfdirstate(ui, repo) | 924 lfdirstate = lfutil.openlfdirstate(ui, repo) |
925 s = lfutil.lfdirstatestatus(lfdirstate, repo) | 925 s = lfutil.lfdirstatestatus(lfdirstate, repo) |
926 lfdirstate.write(repo.currenttransaction()) | 926 lfdirstate.write(repo.currenttransaction()) |
927 for lfile in s.modified: | 927 for lfile in s.modified: |
928 lfutil.updatestandin(repo, lfile, lfutil.standin(lfile)) | 928 lfutil.updatestandin(repo, lfile, lfutil.standin(lfile)) |