mercurial/commands.py
changeset 4249 89075f106414
parent 4231 83153299aab5
child 4250 ca639faa38a2
child 4273 8185a1ca8628
equal deleted inserted replaced
4248:cc81c512a531 4249: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