threads / discuss / 21200

Script to convert git patches to Hg format

Subject: Script to convert git patches to Hg format

## tl;dr

One message between Oct 11, 2009 and Oct 11, 2009.

replies: 0people: 1as markdown or json

Mark Lodato· Oct 11, 2009, 22:56 UTC · lore

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

← back to recent threads