comparison mercurial/commands.py @ 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 83153299aab5
children ca639faa38a2 8185a1ca8628
comparison
equal deleted inserted replaced
4246:cc81c512a531 4247:89075f106414
762 """ 762 """
763 763
764 if not rev2: 764 if not rev2:
765 rev2 = hex(nullid) 765 rev2 = hex(nullid)
766 766
767 repo.dirstate.setparents(repo.lookup(rev1), repo.lookup(rev2)) 767 wlock = repo.wlock()
768 try:
769 repo.dirstate.setparents(repo.lookup(rev1), repo.lookup(rev2))
770 finally:
771 wlock.release()
768 772
769 def debugstate(ui, repo): 773 def debugstate(ui, repo):
770 """show the contents of the current dirstate""" 774 """show the contents of the current dirstate"""
771 repo.dirstate.read() 775 repo.dirstate.read()
772 dc = repo.dirstate.map 776 dc = repo.dirstate.map