Patchwork [4,of,6] hg: update util.writefile method to use write with vfs in share

login
register
mail settings
Submitter Chinmay Joshi
Date June 16, 2014, 4:39 p.m.
Message ID <b5da6438d602ea375b4c.1402936784@genesis>
Download mbox | patch
Permalink /patch/5008/
State Superseded
Commit ff27fad408c4ea341cc73353b2e9821b38101cad
Headers show

Comments

Chinmay Joshi - June 16, 2014, 4:39 p.m.
# HG changeset patch
# User Chinmay Joshi <c@chinmayjoshi.com>
# Date 1402932774 -19800
#      Mon Jun 16 21:02:54 2014 +0530
# Node ID b5da6438d602ea375b4cce2d677ec8cb5ad4c2a2
# Parent  c74650d0e88db42859b07e03d4f266eaae91b2a8
hg: update util.writefile method to use write with vfs in share

This patch replaces util.writefile() to use rvfs.write().

Patch

diff --git a/mercurial/hg.py b/mercurial/hg.py
--- a/mercurial/hg.py
+++ b/mercurial/hg.py
@@ -190,8 +190,8 @@ 
             raise
 
     requirements += 'shared\n'
-    util.writefile(os.path.join(roothg, 'requires'), requirements)
-    util.writefile(os.path.join(roothg, 'sharedpath'), sharedpath)
+    rvfs.write('requires', requirements)
+    rvfs.write('sharedpath', sharedpath)
 
     r = repository(ui, dstvfs.base)