[PATCH] test-notify: make it pass on Mac OS X

Florent Guillaume fg at nuxeo.com
Sat Mar 22 09:30:11 CDT 2008


Christian Ebert wrote:
> * Matt Mackall on Friday, March 21, 2008 at 15:59:55 -0500
>> On Thu, 2008-03-20 at 00:35 +0100, Florent Guillaume wrote:
>>> +hg --traceback --cwd b pull ../a 2>&1 |
>>> +  python -c 'import sys,re; print re.sub("\n\t", " ", 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/' \
>>>   -e 's/^Date:.*/Date:/'
>> That's a pretty scary hack.

I know :) I've racked my brain for a cleaner shell-based way to fold 
"continuation lines" but I didn't come up with anything better than python.

>> Anyone else running into this?
> 
> Nope. But I am on 10.4.11, and probably that's already considered
> ancient; my guess would be that Florent has 10.5* ...

Indeed. On Mac OS X 10.5.2 you get temporary directories like this:

 >>> tempfile.mkdtemp()
'/var/folders/Ju/Ju4ttfuQEtnlI1Z-UOyadE+++TI/-Tmp-/tmph-2EnL'

That's because the system sets:
$ echo $TMPDIR
/var/folders/Ju/Ju4ttfuQEtnlI1Z-UOyadE+++TI/-Tmp-/

Which is probably some securiy-related feature.

And /var is a symlink to /private/var so the actual path when retrieved 
in some cases, like when running the tests, is even longer.

Florent

-- 
Florent Guillaume, Director of R&D, Nuxeo
Open Source Enterprise Content Management (ECM)
http://www.nuxeo.com   http://www.nuxeo.org   +33 1 40 33 79 87


More information about the Mercurial-devel mailing list