From patchwork Wed Jun 5 21:21:08 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: run-tests: open hgrc file only for writing From: Simon Heimberg X-Patchwork-Id: 1707 Message-Id: <1c21d1865eaff1652c9a.1370467268@lapsi.heimberg.home> To: Mercurial-devel Date: Wed, 05 Jun 2013 23:21:08 +0200 # HG changeset patch # User Simon Heimberg # 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')