comparison mercurial/merge.py @ 4917:126f527b3ba3

Make repo locks recursive, eliminate all passing of lock/wlock
author Matt Mackall <mpm@selenic.com>
date Sat, 21 Jul 2007 16:02:10 -0500
parents 97b734fb9c6f
children 54ff1bb4b53a
comparison
equal deleted inserted replaced
4916:5c5d23d93447 4917:126f527b3ba3
494 else: 494 else:
495 repo.dirstate.normal(fd) 495 repo.dirstate.normal(fd)
496 if f: 496 if f:
497 repo.dirstate.forget(f) 497 repo.dirstate.forget(f)
498 498
499 def update(repo, node, branchmerge, force, partial, wlock): 499 def update(repo, node, branchmerge, force, partial):
500 """ 500 """
501 Perform a merge between the working directory and the given node 501 Perform a merge between the working directory and the given node
502 502
503 branchmerge = whether to merge between branches 503 branchmerge = whether to merge between branches
504 force = whether to force branch merging or file overwriting 504 force = whether to force branch merging or file overwriting
505 partial = a function to filter file lists (dirstate not updated) 505 partial = a function to filter file lists (dirstate not updated)
506 wlock = working dir lock, if already held 506 """
507 """ 507
508 508 wlock = repo.wlock()
509 try: 509 try:
510 if not wlock:
511 wlock = repo.wlock()
512
513 wc = repo.workingctx() 510 wc = repo.workingctx()
514 if node is None: 511 if node is None:
515 # tip of current branch 512 # tip of current branch
516 try: 513 try:
517 node = repo.branchtags()[wc.branch()] 514 node = repo.branchtags()[wc.branch()]