clone: for local clones, copy branchcache from the right location (issue4286)

The unfiltered branchcache is in .hg/cache/branch2, not
.hg/store/cache/branch2.
This commit is contained in:
Siddharth Agarwal 2014-08-21 15:58:32 -07:00
parent 1705b23c44
commit 703f8d3ed8

View File

@ -367,7 +367,7 @@ def clone(ui, peeropts, source, dest=None, pull=False, rev=None,
# Recomputing branch cache might be slow on big repos,
# so just copy it
dstcachedir = os.path.join(destpath, 'cache')
srcbranchcache = srcrepo.sjoin('cache/branch2')
srcbranchcache = srcrepo.join('cache/branch2')
dstbranchcache = os.path.join(dstcachedir, 'branch2')
if os.path.exists(srcbranchcache):
if not os.path.exists(dstcachedir):