Created
October 29, 2013 04:19
-
-
Save geoff-nixon/7209122 to your computer and use it in GitHub Desktop.
Use 'hg diff' to produce subversion style patches.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
svnstyle(){ sed -e 's/^diff --git [^[:space:]]*/Index:/' \ | |
-e 's/^Index: b\//Index: /g' -e 's/\+\+\+ b\//+++ /g' -e \ | |
's/--- a\//===================================================================\ | |
--- /g' ;} ## Careful -- preserve the escaped newline on the line above. | |
DIFFPARAMS='-g --nodates --subrepos' | |
hg diff $DIFFPARAMS "$@" | svnstyle |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment