##// END OF EJS Templates
with: use context manager in _markchanges
Bryan O'Sullivan -
r27851:4133a306 default
parent child Browse files
Show More
@@ -983,14 +983,11 b' def _markchanges(repo, unknown, deleted,'
983 '''Marks the files in unknown as added, the files in deleted as removed,
983 '''Marks the files in unknown as added, the files in deleted as removed,
984 and the files in renames as copied.'''
984 and the files in renames as copied.'''
985 wctx = repo[None]
985 wctx = repo[None]
986 wlock = repo.wlock()
986 with repo.wlock():
987 try:
988 wctx.forget(deleted)
987 wctx.forget(deleted)
989 wctx.add(unknown)
988 wctx.add(unknown)
990 for new, old in renames.iteritems():
989 for new, old in renames.iteritems():
991 wctx.copy(old, new)
990 wctx.copy(old, new)
992 finally:
993 wlock.release()
994
991
995 def dirstatecopy(ui, repo, wctx, src, dst, dryrun=False, cwd=None):
992 def dirstatecopy(ui, repo, wctx, src, dst, dryrun=False, cwd=None):
996 """Update the dirstate to reflect the intent of copying src to dst. For
993 """Update the dirstate to reflect the intent of copying src to dst. For
General Comments 0
You need to be logged in to leave comments. Login now