diff options
author | Daniel Silverstone <dsilvers@digital-scurf.org> | 2017-03-04 11:01:05 +0000 |
---|---|---|
committer | Daniel Silverstone <dsilvers@digital-scurf.org> | 2017-03-04 16:48:58 +0000 |
commit | d4fdeb550744b17169383f51f62ea126c7b6cc3e (patch) | |
tree | ea06bc575b2c7f88ae621258e7eb170432997db3 /testing | |
parent | a0ce52fd449aa7d425951da38181daa10a978739 (diff) | |
download | gitano-d4fdeb550744b17169383f51f62ea126c7b6cc3e.tar.gz |
adds the ability to revert content patches
Diffstat (limited to 'testing')
-rw-r--r-- | testing/library.yarn | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/testing/library.yarn b/testing/library.yarn index e6abaf5..b829ce6 100644 --- a/testing/library.yarn +++ b/testing/library.yarn @@ -187,10 +187,15 @@ Admin repo manipulation test "$MATCH_3" = "" fi - IMPLEMENTS WHEN ([a-z][a-z0-9]*) applies ([^ ]+) in ([^ ]+) - $GTT rungit $MATCH_1 $MATCH_3 apply --cached - <"testing/content-patches/$MATCH_2" \ - >$DATADIR/stdout 2>$DATADIR/stderr - $GTT rungit $MATCH_1 $MATCH_3 commit --allow-empty -m "Apply $MATCH_2 content change" \ + IMPLEMENTS WHEN ([a-z][a-z0-9]*) (applies|reverts) ([^ ]+) in ([^ ]+) + if test "$MATCH_2" = "applies"; then + $GTT rungit $MATCH_1 $MATCH_4 apply --cached - <"testing/content-patches/$MATCH_3" \ + >$DATADIR/stdout 2>$DATADIR/stderr + else + $GTT rungit $MATCH_1 $MATCH_4 apply --cached --reverse - <"testing/content-patches/$MATCH_3" \ + >$DATADIR/stdout 2>$DATADIR/stderr + fi + $GTT rungit $MATCH_1 $MATCH_4 commit --allow-empty -m "Apply $MATCH_3 content change" \ >>$DATADIR/stdout 2>>$DATADIR/stderr |