Mercurial > public > mercurial-scm > hg
diff mercurial/hg.py @ 20829:9a09a625bc93
merge with stable
author | Matt Mackall <mpm@selenic.com> |
---|---|
date | Tue, 25 Mar 2014 16:17:16 -0500 |
parents | 8253e55930a3 dda11e799529 |
children | 81d6dc8c3c63 |
line wrap: on
line diff
--- a/mercurial/hg.py Mon Mar 24 20:00:18 2014 -0700 +++ b/mercurial/hg.py Tue Mar 25 16:17:16 2014 -0500 @@ -230,8 +230,10 @@ dstvfs.mkdir(dstbase) if srcvfs.exists(f): if f.endswith('data'): + # 'dstbase' may be empty (e.g. revlog format 0) + lockfile = os.path.join(dstbase, "lock") # lock to avoid premature writing to the target - destlock = lock.lock(dstvfs, dstbase + "/lock") + destlock = lock.lock(dstvfs, lockfile) hardlink, n = util.copyfiles(srcvfs.join(f), dstvfs.join(f), hardlink) num += n