##// END OF EJS Templates
with: use context manager for wlock in debugrebuilddirstate
Bryan O'Sullivan -
r27806:a5eae47a default
parent child Browse files
Show More
@@ -3124,8 +3124,7 def debugrebuilddirstate(ui, repo, rev,
3124 check the actual file content.
3124 check the actual file content.
3125 """
3125 """
3126 ctx = scmutil.revsingle(repo, rev)
3126 ctx = scmutil.revsingle(repo, rev)
3127 wlock = repo.wlock()
3127 with repo.wlock():
3128 try:
3129 dirstate = repo.dirstate
3128 dirstate = repo.dirstate
3130 changedfiles = None
3129 changedfiles = None
3131 # See command doc for what minimal does.
3130 # See command doc for what minimal does.
@@ -3138,8 +3137,6 def debugrebuilddirstate(ui, repo, rev,
3138 changedfiles = manifestonly | dsnotadded
3137 changedfiles = manifestonly | dsnotadded
3139
3138
3140 dirstate.rebuild(ctx.node(), ctx.manifest(), changedfiles)
3139 dirstate.rebuild(ctx.node(), ctx.manifest(), changedfiles)
3141 finally:
3142 wlock.release()
3143
3140
3144 @command('debugrebuildfncache', [], '')
3141 @command('debugrebuildfncache', [], '')
3145 def debugrebuildfncache(ui, repo):
3142 def debugrebuildfncache(ui, repo):
General Comments 0
You need to be logged in to leave comments. Login now