# Script to convert git patches to Hg format

1 messages from 2009-10-11 to 2009-10-11. Participants: Mark Lodato.
Thread: https://gitlist.dev/t/21200

## Mark Lodato, 2009-10-11 22:56

Subject: Script to convert git patches to Hg format
Message-ID: <ca433830910111556r6b11e787l58596b9cf56ac0ff@mail.gmail.com>
URL: https://gitlist.dev/e/ca433830910111556r6b11e787l58596b9cf56ac0ff%40mail.gmail.com

```
To make it easier to submit patches to a project using Hg, I wrote a
small script to convert the output of `git format-patch' to something
suitable for `hg import'.  The latest version is available at:

http://github.com/MarkLodato/patch-converter

While `hg import' *can* read a git patch, it does not interpret the
date, and it includes the diffstat in the commit log.  This script
fixes those problems.

The script worked well enough for me, but bugs may exist.  If you have
ideas for improvement, patches are welcome :)

--
Mark

```
