Submitter | Simon Heimberg |
---|---|
Date | Nov. 2, 2013, 10:33 a.m. |
Message ID | <e0a554964fd56741cf3e.1383388392@lapsi.heimberg.home> |
Download | mbox | patch |
Permalink | /patch/2838/ |
State | Accepted |
Commit | d1e14e7e5b40afefd6a65d477a6b52dfaea2eeed |
Headers | show |
Comments
On Sat, Nov 02, 2013 at 11:33:12AM +0100, Simon Heimberg wrote: > # HG changeset patch > # User Simon Heimberg <simohe@besonet.ch> > # Date 1383387933 -3600 > # Sat Nov 02 11:25:33 2013 +0100 > # Branch stable > # Node ID e0a554964fd56741cf3ea5e688932a990b9529a0 > # Parent 1f6e8488b6c7eab2186c53cc508b7afbb2731caa > check-code: fix an error message queued for default, thanks > > diff -r 1f6e8488b6c7 -r e0a554964fd5 contrib/check-code.py > --- a/contrib/check-code.py Sat Nov 02 11:25:04 2013 +0100 > +++ b/contrib/check-code.py Sat Nov 02 11:25:33 2013 +0100 > @@ -247,7 +247,7 @@ > (r'[\s\(](open|file)\([^)]*\)\.read\(', > "use util.readfile() instead"), > (r'[\s\(](open|file)\([^)]*\)\.write\(', > - "use util.readfile() instead"), > + "use util.writefile() instead"), > (r'^[\s\(]*(open(er)?|file)\([^)]*\)', > "always assign an opened file to a variable, and close it afterwards"), > (r'[\s\(](open|file)\([^)]*\)\.', > _______________________________________________ > Mercurial-devel mailing list > Mercurial-devel@selenic.com > http://selenic.com/mailman/listinfo/mercurial-devel
Patch
diff -r 1f6e8488b6c7 -r e0a554964fd5 contrib/check-code.py --- a/contrib/check-code.py Sat Nov 02 11:25:04 2013 +0100 +++ b/contrib/check-code.py Sat Nov 02 11:25:33 2013 +0100 @@ -247,7 +247,7 @@ (r'[\s\(](open|file)\([^)]*\)\.read\(', "use util.readfile() instead"), (r'[\s\(](open|file)\([^)]*\)\.write\(', - "use util.readfile() instead"), + "use util.writefile() instead"), (r'^[\s\(]*(open(er)?|file)\([^)]*\)', "always assign an opened file to a variable, and close it afterwards"), (r'[\s\(](open|file)\([^)]*\)\.',