[PATCH] (stable) test-fetch: fix non-portable sed regex

Greg Ward greg-hg at gerg.ca
Sun Jul 12 21:33:19 CDT 2009

# HG changeset patch
# User Greg Ward <greg-hg at gerg.ca>
# Date 1247452380 14400
# Node ID fd62724f10e4d102fd8862188ea219038ac8600d
# Parent  72cbbfe6e3430fc4d44a9fac98dc735dcce887df
(stable) test-fetch: fix non-portable sed regex.

(s/...\+/.../ appears to be a GNU-ism: this test broke on OS X and
NetBSD.  Changing \+ to * fixes it, although that is a slightly less
strict regex.)

diff --git a/tests/test-fetch b/tests/test-fetch
--- a/tests/test-fetch
+++ b/tests/test-fetch
@@ -194,7 +194,7 @@
 hg --cwd i1726r1 ci -m second
 echo c > i1726r2/a
 hg --cwd i1726r2 ci -m third
-HGMERGE=true hg --cwd i1726r2 fetch ../i1726r1 | sed 's/new changeset 3:[0-9a-zA-Z]\+/new changeset 3/'
+HGMERGE=true hg --cwd i1726r2 fetch ../i1726r1 | sed 's/new changeset 3:[0-9a-zA-Z]* /new changeset 3 /'
 hg --cwd i1726r2 heads default --template '{rev}\n'

More information about the Mercurial-devel mailing list