changeset 4250 | ca639faa38a2 |
parent 4232 | 0d51eb296fb9 |
parent 4249 | 89075f106414 |
child 4256 | fe0fe0b4d73b |
--- a/mercurial/commands.py +++ b/mercurial/commands.py @@ -765,7 +765,11 @@ def debugsetparents(ui, repo, rev1, rev2 if not rev2: rev2 = hex(nullid) - repo.dirstate.setparents(repo.lookup(rev1), repo.lookup(rev2)) + wlock = repo.wlock() + try: + repo.dirstate.setparents(repo.lookup(rev1), repo.lookup(rev2)) + finally: + wlock.release() def debugstate(ui, repo): """show the contents of the current dirstate"""