# HG changeset patch # User Chinmay Joshi # Date 1403341829 -19800 # Node ID ff27fad408c4ea341cc73353b2e9821b38101cad # Parent 2ccd71bbd0f72860a02eb491ceb3ef305e0d8a17 hg: update util.writefile method to use write with vfs in share This patch replaces util.writefile() to use destvfs.write(). diff -r 2ccd71bbd0f7 -r ff27fad408c4 mercurial/hg.py --- a/mercurial/hg.py Sat Jun 21 14:37:39 2014 +0530 +++ b/mercurial/hg.py Sat Jun 21 14:40:29 2014 +0530 @@ -172,8 +172,6 @@ sharedpath = srcrepo.sharedpath # if our source is already sharing - root = os.path.realpath(dest) - roothg = os.path.join(root, '.hg') destwvfs = scmutil.vfs(dest, realpath=True) destvfs = scmutil.vfs(os.path.join(destwvfs.base, '.hg'), realpath=True) @@ -192,8 +190,8 @@ raise requirements += 'shared\n' - util.writefile(os.path.join(roothg, 'requires'), requirements) - util.writefile(os.path.join(roothg, 'sharedpath'), sharedpath) + destvfs.write('requires', requirements) + destvfs.write('sharedpath', sharedpath) r = repository(ui, destwvfs.base)