Mercurial > hg-stable
changeset 6931:02f4a0bcfdce
test-rebase-mq: '|' is a GNU sed extension, unfold it
author | Patrick Mezard <pmezard@gmail.com> |
---|---|
date | Sun, 24 Aug 2008 19:24:47 +0200 |
parents | a58a611c320f |
children | d557749c627a |
files | tests/test-rebase-mq |
diffstat | 1 files changed, 13 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- a/tests/test-rebase-mq Thu Aug 21 19:05:18 2008 +0200 +++ b/tests/test-rebase-mq Sun Aug 24 19:24:47 2008 +0200 @@ -5,6 +5,16 @@ echo "rebase=" >> $HGRCPATH echo "mq=" >> $HGRCPATH +filterpatch() +{ + sed -e "s/^\(# Date\).*/\1/" \ + -e "s/^\(# Node ID\).*/\1/" \ + -e "s/^\(# Parent\).*/\1/" \ + -e "s/^\(diff -r \)\([a-f0-9]* \)\(-r \)\([a-f0-9]* \)/\1x \3y /" \ + -e "s/\(--- [a-zA-Z0-9_/.-]*\).*/\1/" \ + -e "s/\(+++ [a-zA-Z0-9_/.-]*\).*/\1/" +} + hg init a cd a hg qinit -c # This must work even with a managed mq queue @@ -54,9 +64,7 @@ echo '% f correctly reflects the merge result' cat f echo '% And the patch is correct' -cat .hg/patches/f.patch | sed -e "s/^\(# \(Date\|Node ID\|Parent\)\).*/\1/" \ - -e "s/^\(diff -r \)\([a-f0-9]* \)\(-r \)\([a-f0-9]* \)/\1x \3y /" \ - -e "s/\(\(---\|+++\) [a-zA-Z0-9_/.-]*\).*/\1/" +cat .hg/patches/f.patch | filterpatch echo echo '% Update to qtip' @@ -64,6 +72,5 @@ echo '% f correctly reflects the merge result' cat f echo '% And the patch is correct' -cat .hg/patches/f2.patch | sed -e "s/^\(# \(Date\|Node ID\|Parent\)\).*/\1/" \ - -e "s/^\(diff -r \)\([a-f0-9]* \)\(-r \)\([a-f0-9]* \)/\1x \3y /" \ - -e "s/\(\(---\|+++\) [a-zA-Z0-9_/.-]*\).*/\1/" +cat .hg/patches/f2.patch | filterpatch +