Mercurial > hg-stable
changeset 30246:b4c0f8d5edd2 stable
contrib: check reference to old selenic.com domain
Now, all URL in Mercurial source tree should refer mercurial-scm.org
domain instead of selenic.com.
*.po files are ignored in this patch, because they might contain
msgid/msgstr coming from old source files.
This ignorance seems safe enough, because such msgstr should be
ignored at runtime, because:
- msgid corresponded to it should be invalid, or
- msgstr itself should be marked as fuzzy at synchronized to recent hg.pot
If any additional examination for *.po files is needed in the future,
let i18n/check-translation.py achieve such examination.
BTW, some binary files (e.g. *.png) are meaningless for checking
reference to old domain in this patch, but aren't ignored like as *.po
files, because excluding multiple suffixes is difficult for regexp
matching.
author | FUJIWARA Katsunori <foozy@lares.dti.ne.jp> |
---|---|
date | Tue, 01 Nov 2016 20:39:37 +0900 |
parents | 01703a8b8a46 |
children | 27addd7e8eca |
files | contrib/check-code.py |
diffstat | 1 files changed, 13 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/contrib/check-code.py Tue Nov 01 20:39:36 2016 +0900 +++ b/contrib/check-code.py Tue Nov 01 20:39:37 2016 +0900 @@ -444,6 +444,17 @@ ] ] +allfilesfilters = [] + +allfilespats = [ + [ + (r'(http|https)://[a-zA-Z0-9./]*selenic.com/', + 'use mercurial-scm.org domain URL'), + ], + # warnings + [], +] + checks = [ ('python', r'.*\.(py|cgi)$', r'^#!.*python', pyfilters, pypats), ('test script', r'(.*/)?test-[^.~]*$', '', testfilters, testpats), @@ -456,6 +467,8 @@ ('txt', r'.*\.txt$', '', txtfilters, txtpats), ('web template', r'mercurial/templates/.*\.tmpl', '', webtemplatefilters, webtemplatepats), + ('all except for .po', r'.*(?<!\.po)$', '', + allfilesfilters, allfilespats), ] def _preparepats():