hgext/remotefilelog/repack.py
changeset 42947 5fadf6103790
parent 42852 2c74337e6483
child 43076 2372284d9457
--- a/hgext/remotefilelog/repack.py	Tue Sep 17 18:36:30 2019 +0200
+++ b/hgext/remotefilelog/repack.py	Wed Sep 11 17:41:13 2019 +0200
@@ -11,6 +11,7 @@
 from mercurial import (
     encoding,
     error,
+    lock as lockmod,
     mdiff,
     policy,
     pycompat,
@@ -23,7 +24,6 @@
     constants,
     contentstore,
     datapack,
-    extutil,
     historypack,
     metadatastore,
     shallowutil,
@@ -432,8 +432,8 @@
     def run(self, targetdata, targethistory):
         ledger = repackledger()
 
-        with extutil.flock(repacklockvfs(self.repo).join("repacklock"),
-                           _('repacking %s') % self.repo.origroot, timeout=0):
+        with lockmod.lock(repacklockvfs(self.repo), "repacklock", desc=None,
+                          timeout=0):
             self.repo.hook('prerepack')
 
             # Populate ledger from source