Mercurial > hg
diff tests/hghave @ 9817:912ce84eebae
hghave: be more tolerant to rst2html output
On Windows, rst2html.bat calls rst2html.py, printing something like:
"rst2html.py (Docutils"
(notice the extra ".py")
author | Patrick Mezard <pmezard@gmail.com> |
---|---|
date | Tue, 10 Nov 2009 11:57:03 +0100 |
parents | a73f9ee83832 |
children | dec177286deb |
line wrap: on
line diff
--- a/tests/hghave Tue Nov 10 21:55:59 2009 +0100 +++ b/tests/hghave Tue Nov 10 11:57:03 2009 +0100 @@ -121,8 +121,11 @@ return matchoutput('git --version 2>&1', r'^git version') def has_rst2html(): - return matchoutput('rst2html --version 2>&1', r'^rst2html \(Docutils') or \ - matchoutput('rst2html.py --version 2>&1', r'^rst2html.py \(Docutils') + for name in ('rst2html', 'rst2html.py'): + name = name + ' --version 2>&1' + if matchoutput(name, r'^rst2html(?:\.py)? \(Docutils'): + return True + return False def has_svn(): #return matchoutput('svn --version 2>&1', r'^svn, version') and \