# HG changeset patch # User Christian Ebert # Date 1286620495 -3600 # Node ID cd834b4035eca889b029877329c10d3452f2803d # Parent 00570f6507923239afb153abc0b11d2ad42438a2 test: remove remaining sed calls diff -r 00570f650792 -r cd834b4035ec tests/test-keyword.t --- a/tests/test-keyword.t Sat Oct 09 11:34:39 2010 +0100 +++ b/tests/test-keyword.t Sat Oct 09 11:34:55 2010 +0100 @@ -50,6 +50,9 @@ > b = ignore > i = ignore > [hooks] + > EOF + $ cp $HGRCPATH $HGRCPATH.nohooks + > cat <> $HGRCPATH > commit= > commit.test=cp a hooktest > EOF @@ -157,10 +160,7 @@ $ diff a hooktest -Removing commit hook from config - - $ sed -e '/\[hooks\]/,$ d' "$HGRCPATH" > $HGRCPATH.nohook - $ mv "$HGRCPATH".nohook "$HGRCPATH" + $ cp $HGRCPATH.nohooks $HGRCPATH $ rm hooktest bundle @@ -247,10 +247,7 @@ +ignore $Id$ 3 files updated, 0 files merged, 0 files removed, 0 files unresolved -Remove notify config - - $ sed -e '/\[hooks\]/,$ d' "$HGRCPATH" > $HGRCPATH.nonotify - $ mv "$HGRCPATH".nonotify "$HGRCPATH" + $ cp $HGRCPATH.nohooks $HGRCPATH Touch files and check with status @@ -730,8 +727,8 @@ Imported patch should not be rejected - $ sed -e 's/Id.*/& rejecttest/' a > a.new - $ mv a.new a + $ python -c \ + > 'import re; s=re.sub("(Id.*)","\\1 rejecttest",open("a").read()); open("a","wb").write(s);' $ hg --debug commit -m'rejects?' -d '3 0' -u 'User Name ' a overwriting a expanding keywords