changeset 11889:3b65c3c3cc8d stable

test-notify: make it pass on Mac OS X (again) Changeset 25e74cd3f023 (from 2008) introduced a hack to handle the very long values of $TMPDIR typically seen on Mac OS X. This hack expected continuation lines to begin with a tab. However, as a result of a change in Python 2.7, changeset 594b98846ce1 made it so continuation lines began with a tab. Since then, `test-notify' has been broken on Mac OS X. Merely replacing the tab in the regular expression with a space will not work: not only do tab continuations still occur in the message, but other lines -- in the body of the message -- also start with a space. Luckily, all broken up lines appear to end with either a colon or an n, so we can match those, and reinsert them in the replacement.
author Dan Villiom Podlaski Christiansen <danchr@gmail.com>
date Fri, 13 Aug 2010 17:21:06 +0200
parents 08cd25ef8a38
children 9dac951d0185
files tests/test-notify
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/tests/test-notify	Sun Aug 15 17:49:59 2010 +0200
+++ b/tests/test-notify	Fri Aug 13 17:21:06 2010 +0200
@@ -41,7 +41,7 @@
 # of the very long subject line
 echo '% pull (minimal config)'
 hg --traceback --cwd b pull ../a 2>&1 |
-  python -c 'import sys,re; print re.sub("\n\t", " ", sys.stdin.read()),' |
+  python -c 'import sys,re; print re.sub("([n:])\\n[\\t ]", "\\1 ", sys.stdin.read()),' |
   sed -e 's/\(Message-Id:\).*/\1/' \
   -e 's/changeset \([0-9a-f]* *\)in .*test-notif/changeset \1in test-notif/' \
   -e 's/^details: .*test-notify/details: test-notify/' \