diff hggit/__init__.py @ 897:8026c094173a

pull: acquire wlock before lock to fix lock-checker warnings
author Augie Fackler <raf@durin42.com>
date Wed, 29 Apr 2015 18:03:03 -0400
parents 8f9d52f7942e
children 11ca21820a95
line wrap: on
line diff
--- a/hggit/__init__.py	Wed Apr 22 16:41:38 2015 -0700
+++ b/hggit/__init__.py	Wed Apr 29 18:03:03 2015 -0400
@@ -227,6 +227,7 @@
                                         bookmarks=bookmarks)
         if trmanager:
             pullop.trmanager = trmanager(repo, 'pull', remote.url())
+        wlock = repo.wlock()
         lock = repo.lock()
         try:
             pullop.cgresult = repo.githandler.fetch(remote.path, heads)
@@ -241,6 +242,7 @@
             else:
                 pullop.releasetransaction()
             lock.release()
+            wlock.release()
     else:
         return orig(repo, remote, heads, force, bookmarks=bookmarks)
 if not hgutil.safehasattr(localrepo.localrepository, 'pull'):