Mercurial > public > mercurial-scm > hg
comparison mercurial/hg.py @ 31322:4282feb79432
hg-mod: directly use repo.vfs.join
The 'repo.join' method is about to be deprecated.
author | Pierre-Yves David <pierre-yves.david@ens-lyon.org> |
---|---|
date | Wed, 08 Mar 2017 16:53:24 -0800 |
parents | f59b6cf663a9 |
children | 2545ee88a57e |
comparison
equal
deleted
inserted
replaced
31321:a3a2382b2e1b | 31322:4282feb79432 |
---|---|
557 % dest) | 557 % dest) |
558 raise | 558 raise |
559 | 559 |
560 destlock = copystore(ui, srcrepo, destpath) | 560 destlock = copystore(ui, srcrepo, destpath) |
561 # copy bookmarks over | 561 # copy bookmarks over |
562 srcbookmarks = srcrepo.join('bookmarks') | 562 srcbookmarks = srcrepo.vfs.join('bookmarks') |
563 dstbookmarks = os.path.join(destpath, 'bookmarks') | 563 dstbookmarks = os.path.join(destpath, 'bookmarks') |
564 if os.path.exists(srcbookmarks): | 564 if os.path.exists(srcbookmarks): |
565 util.copyfile(srcbookmarks, dstbookmarks) | 565 util.copyfile(srcbookmarks, dstbookmarks) |
566 | 566 |
567 # Recomputing branch cache might be slow on big repos, | 567 # Recomputing branch cache might be slow on big repos, |
568 # so just copy it | 568 # so just copy it |
569 def copybranchcache(fname): | 569 def copybranchcache(fname): |
570 srcbranchcache = srcrepo.join('cache/%s' % fname) | 570 srcbranchcache = srcrepo.vfs.join('cache/%s' % fname) |
571 dstbranchcache = os.path.join(dstcachedir, fname) | 571 dstbranchcache = os.path.join(dstcachedir, fname) |
572 if os.path.exists(srcbranchcache): | 572 if os.path.exists(srcbranchcache): |
573 if not os.path.exists(dstcachedir): | 573 if not os.path.exists(dstcachedir): |
574 os.mkdir(dstcachedir) | 574 os.mkdir(dstcachedir) |
575 util.copyfile(srcbranchcache, dstbranchcache) | 575 util.copyfile(srcbranchcache, dstbranchcache) |