diff mercurial/hg.py @ 20091:abfe6a8e619b

lock: take both vfs and lock file path relative to vfs to access via vfs This patch makes "lock.lock.__init__()" take both vfs and lock file path relative to vfs, instead of absolute path to lock file. This allows lock file to be accessed via vfs.
author FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
date Tue, 12 Nov 2013 16:23:52 +0900
parents 2d0ab571b822
children 9e0219967e38
line wrap: on
line diff
--- a/mercurial/hg.py	Tue Nov 12 16:23:52 2013 +0900
+++ b/mercurial/hg.py	Tue Nov 12 16:23:52 2013 +0900
@@ -213,7 +213,7 @@
             if srcvfs.exists(f):
                 if f.endswith('data'):
                     # lock to avoid premature writing to the target
-                    destlock = lock.lock(dstvfs.join(dstbase + "/lock"))
+                    destlock = lock.lock(dstvfs, dstbase + "/lock")
                 hardlink, n = util.copyfiles(srcvfs.join(f), dstvfs.join(f),
                                              hardlink)
                 num += n