Use mercurial import command to apply patch. Fixes #2563