Jason Grout <jason-s...@creativetrax.com> writes: > Keshav: is there an easy way to make a new git command which generates > a mercurial patch by adding those lines to the top of a generated > patch?
Sure, just drop a script called `git-sage-patch` somewhere in your $PATH. Here's such a script:: #!/bin/bash # Script to produce a patch to the Sage library. # Usage: # git sage-patch filename.patch "commit message" echo "# HG changeset patch # User $(git config user.name) <$(git config user.email)> # Date $(date +%s) 0000 $2 " > $1 git diff upstream/master HEAD >> $1 Disclaimer: this script is not very robust and fails with a cryptic error message if you use it somewhere other than inside the Sage library repo, or don't provide it the correct command line arguments. It also doesn't check that the filename exists before exporting the patch. Use with caution! :) -Keshav ---- Join us in #sagemath on irc.freenode.net ! -- To post to this group, send an email to sage-devel@googlegroups.com To unsubscribe from this group, send an email to sage-devel+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-devel URL: http://www.sagemath.org