# HG changeset patch # User FUJIWARA Katsunori # Date 1457724942 -32400 # Node ID 138ec8835e63006158ba0b87e457dc4a50892546 # Parent e0d19d95560888a742a47a6956b7438acee26476 hg: acquire wlock while updating the working directory via updatetotally updatetotally() might be invoked outside wlock scope (e.g. invocation via postincoming() at "hg unbundle" or "hg pull"). In such case, acquisition of wlock is needed for consistent view, because parallel "hg update" and/or "hg bookmarks" might change working directory status while executing updatetotally(). Strictly speaking, truly consistent updating should acquire also store lock, because active bookmark might be moved to another one outside wlock scope (e.g. pulling from other repository causes updating current active one). Acquisition of wlock in this patch ensures consistency in as same level as past "hg update". diff -r e0d19d955608 -r 138ec8835e63 mercurial/hg.py --- a/mercurial/hg.py Sat Mar 12 04:35:42 2016 +0900 +++ b/mercurial/hg.py Sat Mar 12 04:35:42 2016 +0900 @@ -714,7 +714,7 @@ This returns whether conflict is detected at updating or not. """ - if True: + with repo.wlock(): movemarkfrom = None warndest = False if checkout is None: