Patchwork [2,of,2] hghave: check darcs version more strictly

login
register
mail settings
Submitter Yuya Nishihara
Date Nov. 5, 2016, 4:45 a.m.
Message ID <5aa8ce5ded5e10b48309.1478321159@mimosa>
Download mbox | patch
Permalink /patch/17344/
State Accepted
Headers show

Comments

Yuya Nishihara - Nov. 5, 2016, 4:45 a.m.
# HG changeset patch
# User Yuya Nishihara <yuya@tcha.org>
# Date 1478319653 -32400
#      Sat Nov 05 13:20:53 2016 +0900
# Node ID 5aa8ce5ded5e10b4830975a2735e0143750f2f7c
# Parent  566a342697a2740f94fd85006f7dac0580bd473b
hghave: check darcs version more strictly

test-convert-darcs.t suddenly started failing on my Debian sid machine. The
reason was Darcs was upgraded from 2.12.0 to 2.12.4 so the original pattern
got to match the last two digits. Fix the pattern to match 2.2+.
Pierre-Yves David - Nov. 5, 2016, 8:13 p.m.
On 11/05/2016 05:45 AM, Yuya Nishihara wrote:
> # HG changeset patch
> # User Yuya Nishihara <yuya@tcha.org>
> # Date 1478319653 -32400
> #      Sat Nov 05 13:20:53 2016 +0900
> # Node ID 5aa8ce5ded5e10b4830975a2735e0143750f2f7c
> # Parent  566a342697a2740f94fd85006f7dac0580bd473b
> hghave: check darcs version more strictly
>
> test-convert-darcs.t suddenly started failing on my Debian sid machine. The
> reason was Darcs was upgraded from 2.12.0 to 2.12.4 so the original pattern
> got to match the last two digits. Fix the pattern to match 2.2+.

This is pushed, thanks.

Patch

diff --git a/tests/hghave.py b/tests/hghave.py
--- a/tests/hghave.py
+++ b/tests/hghave.py
@@ -150,7 +150,7 @@  def has_cvsnt():
 
 @check("darcs", "darcs client")
 def has_darcs():
-    return matchoutput('darcs --version', br'2\.[2-9]', True)
+    return matchoutput('darcs --version', br'\b2\.([2-9]|\d{2})', True)
 
 @check("mtn", "monotone client (>= 1.0)")
 def has_mtn():