hg: update util.writefile method to use write with vfs in share
This patch replaces util.writefile() to use destvfs.write().
--- 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)