Mercurial > hg-stable
changeset 4247:89075f106414
debugsetparents: wlock the repo before updating the dirstate
author | Alexis S. L. Carvalho <alexis@cecm.usp.br> |
---|---|
date | Mon, 19 Mar 2007 19:07:40 -0300 |
parents | cc81c512a531 |
children | ca639faa38a2 fe7f38dda34b |
files | mercurial/commands.py |
diffstat | 1 files changed, 5 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/commands.py Mon Mar 19 19:07:39 2007 -0300 +++ b/mercurial/commands.py Mon Mar 19 19:07:40 2007 -0300 @@ -764,7 +764,11 @@ 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"""