# HG changeset patch # User Maxim Dounin # Date 1199764581 -10800 # Node ID 38b592536a5871bb3de8663914d559fda4697690 # Parent 5379497af641f87170c1eff2d0bb2a7df2189908 test-mq-header: don't fail with different patch(1) At least under FreeBSD patch(1) won't fail on empty patch and will print 'Hmm...' warning instead. Sanitize output so tests won't fail unexpectedly. diff -r 5379497af641 -r 38b592536a58 tests/test-mq-header-date --- a/tests/test-mq-header-date Tue Jan 08 15:56:12 2008 -0600 +++ b/tests/test-mq-header-date Tue Jan 08 06:56:21 2008 +0300 @@ -103,8 +103,7 @@ hg qpop echo "# HG changeset patch" >>.hg/patches/5.patch echo "# Date 10 0" >>.hg/patches/5.patch -# Drop patch specific error line -hg qpush 2>&1 | grep -v garbage +hg qpush 2>&1 | grep 'Now at' catlogd 5 echo ==== hg qref diff -r 5379497af641 -r 38b592536a58 tests/test-mq-header-date.out --- a/tests/test-mq-header-date.out Tue Jan 08 15:56:12 2008 -0600 +++ b/tests/test-mq-header-date.out Tue Jan 08 06:56:21 2008 +0300 @@ -129,9 +129,6 @@ Now at: 3.patch ==== qnew with HG header Now at: 3.patch -applying 5.patch -patch failed, unable to continue (try -v) -patch 5.patch is empty Now at: 5.patch # HG changeset patch # Date 10 0 diff -r 5379497af641 -r 38b592536a58 tests/test-mq-header-from --- a/tests/test-mq-header-from Tue Jan 08 15:56:12 2008 -0600 +++ b/tests/test-mq-header-from Tue Jan 08 06:56:21 2008 +0300 @@ -83,8 +83,7 @@ hg qpop echo "# HG changeset patch" >>.hg/patches/5.patch echo "# User johndoe" >>.hg/patches/5.patch -# Drop patch specific error line -hg qpush 2>&1 | grep -v garbage +hg qpush 2>&1 | grep 'Now at' catlog 5 echo ==== hg qref diff -r 5379497af641 -r 38b592536a58 tests/test-mq-header-from.out --- a/tests/test-mq-header-from.out Tue Jan 08 15:56:12 2008 -0600 +++ b/tests/test-mq-header-from.out Tue Jan 08 06:56:21 2008 +0300 @@ -131,9 +131,6 @@ 0: [mq]: 1.patch - mary ==== qnew with HG header Now at: 4.patch -applying 5.patch -patch failed, unable to continue (try -v) -patch 5.patch is empty Now at: 5.patch # HG changeset patch # User johndoe