#!/bin/sh cat > unix2mac.py < print.py <').replace('\r', '').replace('\0', '')) EOF hg init echo '[hooks]' >> .hg/hgrc echo 'pretxncommit.cr = python:hgext.win32text.forbidcr' >> .hg/hgrc echo 'pretxnchangegroup.cr = python:hgext.win32text.forbidcr' >> .hg/hgrc cat .hg/hgrc echo echo hello > f hg add f hg ci -m 1 echo python unix2mac.py f hg ci -m 2 hg cat f | python print.py cat f | python print.py