[PATCH] run-tests: open hgrc file only for writing

Simon Heimberg simohe at besonet.ch
Wed Jun 5 16:21:08 CDT 2013


# HG changeset patch
# User Simon Heimberg <simohe at besonet.ch>
# Date 1370464963 -7200
# Node ID 1c21d1865eaff1652c9a454d34a73b86fd8302f9
# Parent  f72121d11dc38ec4e0fe006cb34cd92b98155027
run-tests: open hgrc file only for writing

The file is not read here. Opening with "w+" is unnecessary.

diff -r f72121d11dc3 -r 1c21d1865eaf tests/run-tests.py
--- a/tests/run-tests.py	Mit Jun 05 22:41:53 2013 +0200
+++ b/tests/run-tests.py	Mit Jun 05 22:42:43 2013 +0200
@@ -333,7 +333,7 @@
 
 def createhgrc(path, options):
     # create a fresh hgrc
-    hgrc = open(path, 'w+')
+    hgrc = open(path, 'w')
     hgrc.write('[ui]\n')
     hgrc.write('slash = True\n')
     hgrc.write('interactive = False\n')


More information about the Mercurial-devel mailing list