#!/bin/sh hg init a cd a echo % new file hg import -d "1000000 0" -mnew - < foo hg add foo hg ci -m 'add foo' echo % binary files and regular patch hunks hg import -d "1000000 0" -m binaryregular - <