diff mercurial/merge.py @ 4961: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
line wrap: on
line diff
--- a/mercurial/merge.py
+++ b/mercurial/merge.py
@@ -496,20 +496,17 @@ def recordupdates(repo, action, branchme
                 if f:
                     repo.dirstate.forget(f)
 
-def update(repo, node, branchmerge, force, partial, wlock):
+def update(repo, node, branchmerge, force, partial):
     """
     Perform a merge between the working directory and the given node
 
     branchmerge = whether to merge between branches
     force = whether to force branch merging or file overwriting
     partial = a function to filter file lists (dirstate not updated)
-    wlock = working dir lock, if already held
     """
 
+    wlock = repo.wlock()
     try:
-        if not wlock:
-            wlock = repo.wlock()
-
         wc = repo.workingctx()
         if node is None:
             # tip of current branch