Mercurial > public > mercurial-scm > hg-stable
diff mercurial/subrepo.py @ 17707:35674bd95200
subrepo, hghave: use "svn --version --quiet" to determine version number
svn --version --quiet is implemented since svn 0.14.1 (August 2002)
and prints just the version number, not the long output (21 lines)
of "svn --version".
Additionally I expect this output format to be more stable, at least
it is not changed with different translations.
author | Thomas Arendsen Hein <thomas@intevation.de> |
---|---|
date | Thu, 04 Oct 2012 16:52:20 +0200 |
parents | 70efdc22b188 |
children | 573bec4ab7ba |
line wrap: on
line diff
--- a/mercurial/subrepo.py Thu Oct 04 16:44:28 2012 +0200 +++ b/mercurial/subrepo.py Thu Oct 04 16:52:20 2012 +0200 @@ -674,8 +674,8 @@ @propertycache def _svnversion(self): - output, err = self._svncommand(['--version'], filename=None) - m = re.search(r'^svn,\s+version\s+(\d+)\.(\d+)', output) + output, err = self._svncommand(['--version', '--quiet'], filename=None) + m = re.search(r'^(\d+)\.(\d+)', output) if not m: raise util.Abort(_('cannot retrieve svn tool version')) return (int(m.group(1)), int(m.group(2)))