Skip to content

Instantly share code, notes, and snippets.

@smerrill
Created May 17, 2011 13:34
Show Gist options
  • Save smerrill/976472 to your computer and use it in GitHub Desktop.
Save smerrill/976472 to your computer and use it in GitHub Desktop.
#!/bin/bash
for i in `hg log | grep -B3 "Added tag" | grep changeset: | egrep -o " [0-9]+"`; do hg up -C $i; cat .hgtags >> /tmp/all-tags.txt; done
hg up -C default
cat /tmp/all-tags.txt | awk '{ print $2" "$1; }' | sort -n | uniq | awk '{ print $2" "$1; }' > .hgtags
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment