Created
December 21, 2014 06:18
-
-
Save akash0x53/c24492f905c1b7a9bcb0 to your computer and use it in GitHub Desktop.
generate hg diff
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
| #Generate Mercurial diff and save in `diffs' subdir. | |
| generate_diff(){ | |
| diff_dir="diffs" | |
| mkdir -p ${diff_dir} | |
| branch=`hg branch` | |
| now=`date +"%F_%T"` | |
| file_path="${PWD}/${diff_dir}/${branch}_${now}.diff" | |
| `hg diff > ${file_path}` | |
| [ $? -eq 0 ] && echo "created diff ${file_path}" | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment