Last active
December 19, 2015 03:08
-
-
Save patoarvizu/5887789 to your computer and use it in GitHub Desktop.
Script to capture the branches that have incoming changes and dump them in a file to be used later. This doesn't detect changes in the default branch, so the last couple of lines should take care of that if you need this.
This file contains 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
# This command can seem confusing, so here's the explanation | |
# hg in -q --template '{branch}\n' -> Ask for the incoming changes, in quiet mode (display only the changesets) with a tempate, displaying only the branches | |
# grep -v feature/ -> Display only the branches that are NOT feature branches (feature branches have a feature/ prefix) | |
# sort -u -> Sort the records and eliminate duplicates. | |
# > branches -> Save the output to a file called 'branches' | |
hg in -q --template '{branch}\n' | grep -v feature/ | sort -u > branches | |
hg in -q -b default | |
if [ $? -eq "0" ] then | |
echo "default" >> branches | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment