[PATCH] Make test-convert-cvs work with older cvs versions

Christian Ebert blacktrash at gmx.net
Wed Oct 3 06:46:09 CDT 2007


* Patrick Mézard on Wednesday, October 03, 2007 at 11:57:35 +0200
> Does the following work for you ?

In principle yes, but it doesn't apply cleanly, as you seem to
have changed test-convert-cvs.out beforehand to comply with cvs
1.11.20.

> I think it is a bit simpler, and it works for me with 1.11.20
> and 1.11.22.

Ok. I wasn't sure how much to remove from the output.

BTW, what is faster:

grep -F '<--' | sed -e 's:.*src/\(.*\),v.*:checking in src/\1,v:g'
or
sed -e '/<--/!d' -e 's:.*src/\(.*\),v.*:checking in src/\1,v:g'
?


Here goes with grep, otherwise use second of above:


# HG changeset patch
# User Christian Ebert <blacktrash at gmx.net>
# Date 1191410965 -7200
# Node ID aa4cbce7fa8ce9c691e2701f66a0de9b78416f79
# Parent  9bdce4a7964c338f4a337a1667f5dd930662a32c
test-convert-cvs: handle older cvs client

diff --git a/tests/test-convert-cvs b/tests/test-convert-cvs
--- a/tests/test-convert-cvs
+++ b/tests/test-convert-cvs
@@ -38,7 +38,8 @@ cd src
 cd src
 echo a >> a
 echo c >> b/c
-cvs -q commit -mci1 . | sed -e 's:.*src/\(.*\),v:src/\1,v:g'
+cvs -q commit -mci1 . | grep -F '<--' |\
+    sed -e 's:.*src/\(.*\),v.*:checking in src/\1,v:g'
 cd ..
 
 echo % convert again
diff --git a/tests/test-convert-cvs.out b/tests/test-convert-cvs.out
--- a/tests/test-convert-cvs.out
+++ b/tests/test-convert-cvs.out
@@ -21,10 +21,8 @@ a
 a
 c
 % commit new file revisions
-src/a,v  <--  a
-new revision: 1.2; previous revision: 1.1
-src/b/c,v  <--  b/c
-new revision: 1.2; previous revision: 1.1
+checking in src/a,v
+checking in src/b/c,v
 % convert again
 destination src-hg is a Mercurial repository
 connecting to cvsrepo


More information about the Mercurial-devel mailing list