Patchwork D1000: contrib: add check-code rule banning use of readlink

login
register
mail settings
Submitter phabricator
Date Oct. 10, 2017, 6:15 p.m.
Message ID <differential-rev-PHID-DREV-k6u3asda7j6enoza3pzo-req@phab.mercurial-scm.org>
Download mbox | patch
Permalink /patch/24709/
State Superseded
Headers show

Comments

phabricator - Oct. 10, 2017, 6:15 p.m.
durin42 created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.

REVISION SUMMARY
  readlink doesn't always exist, such as on Solaris-derived platforms.

REPOSITORY
  rHG Mercurial

REVISION DETAIL
  https://phab.mercurial-scm.org/D1000

AFFECTED FILES
  contrib/check-code.py

CHANGE DETAILS




To: durin42, #hg-reviewers
Cc: mercurial-devel
phabricator - Oct. 10, 2017, 6:52 p.m.
quark accepted this revision.
quark added a comment.


  LGTM.

REPOSITORY
  rHG Mercurial

REVISION DETAIL
  https://phab.mercurial-scm.org/D1000

To: durin42, #hg-reviewers, quark
Cc: quark, mercurial-devel
phabricator - Oct. 11, 2017, 8:58 a.m.
ryanmce accepted this revision.
ryanmce added a comment.
This revision is now accepted and ready to land.


  queued

REPOSITORY
  rHG Mercurial

REVISION DETAIL
  https://phab.mercurial-scm.org/D1000

To: durin42, #hg-reviewers, quark, ryanmce
Cc: ryanmce, quark, mercurial-devel
phabricator - Oct. 11, 2017, 12:44 p.m.
mitrandir added a comment.


  Wow, it's https://phab.mercurial-scm.org/D1000 :D
  partysnake <https://phab.mercurial-scm.org/file/data/rtvhzxf3k76lfp76cco2/PHID-FILE-tzs5jc2ybb5syhm4uhio/20265877_1768566626504339_5323767393963474944_n.jpg>

REPOSITORY
  rHG Mercurial

REVISION DETAIL
  https://phab.mercurial-scm.org/D1000

To: durin42, #hg-reviewers, quark, ryanmce
Cc: mitrandir, ryanmce, quark, mercurial-devel

Patch

diff --git a/contrib/check-code.py b/contrib/check-code.py
--- a/contrib/check-code.py
+++ b/contrib/check-code.py
@@ -203,6 +203,7 @@ 
      'use test -f to test for file existence'),
     (r'^  diff -[^ -]*p',
      "don't use (external) diff with -p for portability"),
+    (r' readlink ', 'use readlink.py instead of readlink'),
     (r'^  [-+][-+][-+] .* [-+]0000 \(glob\)',
      "glob timezone field in diff output for portability"),
     (r'^  @@ -[0-9]+ [+][0-9]+,[0-9]+ @@',