##// END OF EJS Templates
with: use context manager for wlock in revert
Bryan O'Sullivan -
r27803:a8e8950e default
parent child Browse files
Show More
@@ -2868,8 +2868,7 b' def revert(ui, repo, ctx, parents, *pats'
2868 2868 # <asb path in repo> -> (<path from CWD>, <exactly specified by matcher?>)
2869 2869 names = {}
2870 2870
2871 wlock = repo.wlock()
2872 try:
2871 with repo.wlock():
2873 2872 ## filling of the `names` mapping
2874 2873 # walk dirstate to fill `names`
2875 2874
@@ -3122,8 +3121,6 b' def revert(ui, repo, ctx, parents, *pats'
3122 3121 except KeyError:
3123 3122 raise error.Abort("subrepository '%s' does not exist in %s!"
3124 3123 % (sub, short(ctx.node())))
3125 finally:
3126 wlock.release()
3127 3124
3128 3125 def _revertprefetch(repo, ctx, *files):
3129 3126 """Let extension changing the storage layer prefetch content"""
General Comments 0
You need to be logged in to leave comments. Login now