Mercurial > public > mercurial-scm > hg
comparison mercurial/hg.py @ 22263:ab0c42d22522
clone: for local clones, copy branchcache from the right location (issue4286)
The unfiltered branchcache is in .hg/cache/branch2, not
.hg/store/cache/branch2.
author | Siddharth Agarwal <sid0@fb.com> |
---|---|
date | Thu, 21 Aug 2014 15:58:32 -0700 |
parents | becb61de90a1 |
children | 4bc1fd86e915 |
comparison
equal
deleted
inserted
replaced
22262:10880c8aad85 | 22263:ab0c42d22522 |
---|---|
365 destlock = copystore(ui, srcrepo, destpath) | 365 destlock = copystore(ui, srcrepo, destpath) |
366 | 366 |
367 # Recomputing branch cache might be slow on big repos, | 367 # Recomputing branch cache might be slow on big repos, |
368 # so just copy it | 368 # so just copy it |
369 dstcachedir = os.path.join(destpath, 'cache') | 369 dstcachedir = os.path.join(destpath, 'cache') |
370 srcbranchcache = srcrepo.sjoin('cache/branch2') | 370 srcbranchcache = srcrepo.join('cache/branch2') |
371 dstbranchcache = os.path.join(dstcachedir, 'branch2') | 371 dstbranchcache = os.path.join(dstcachedir, 'branch2') |
372 if os.path.exists(srcbranchcache): | 372 if os.path.exists(srcbranchcache): |
373 if not os.path.exists(dstcachedir): | 373 if not os.path.exists(dstcachedir): |
374 os.mkdir(dstcachedir) | 374 os.mkdir(dstcachedir) |
375 util.copyfile(srcbranchcache, dstbranchcache) | 375 util.copyfile(srcbranchcache, dstbranchcache) |