##// END OF EJS Templates
with: use context manager for wlock in cmdutilforget
Bryan O'Sullivan -
r27824:0e55e93b default
parent child Browse files
Show More
@@ -1053,8 +1053,7 b' def cmdutilforget(orig, ui, repo, match,'
1053 1053
1054 1054 # Need to lock because standin files are deleted then removed from the
1055 1055 # repository and we could race in-between.
1056 wlock = repo.wlock()
1057 try:
1056 with repo.wlock():
1058 1057 lfdirstate = lfutil.openlfdirstate(ui, repo)
1059 1058 for f in forget:
1060 1059 if lfdirstate[f] == 'a':
@@ -1066,8 +1065,6 b' def cmdutilforget(orig, ui, repo, match,'
1066 1065 for f in standins:
1067 1066 util.unlinkpath(repo.wjoin(f), ignoremissing=True)
1068 1067 rejected = repo[None].forget(standins)
1069 finally:
1070 wlock.release()
1071 1068
1072 1069 bad.extend(f for f in rejected if f in m.files())
1073 1070 forgot.extend(f for f in forget if f not in rejected)
General Comments 0
You need to be logged in to leave comments. Login now