Created
November 25, 2014 22:49
-
-
Save upsuper/6f67f933fa583d3750ae to your computer and use it in GitHub Desktop.
Clear left .orig & .rej in hg repo
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 | |
| files=$(hg status | awk '$1 == "?" && $2 ~ /\.(orig|rej)$/ { print $2 }') | |
| echo "$files" | |
| read -r -p "Remove these files? [y/N]" resp | |
| case $resp in | |
| [yY][eE][sS]|[yY]) | |
| rm $files | |
| ;; | |
| *) | |
| ;; | |
| esac |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment