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)) |