FindingOldBranches » History » Version 2

Version 1 (Chris Cannam, 2012-02-02 09:29 AM) → Version 2/5 (Chris Cannam, 2012-02-02 09:31 AM)

h1. Finding Old Branches

List bug or feature branches that have not been modified since October 2011 and that have been merged into other branches since they were last modified:

<pre>
$ hg -q branches | \
egrep '(bug_|feature_)'
| \
while read b; do \
oldmerges=`hg log --template '{rev}\n' -r "children(last(branch('"$b"')) and date('<Oct 1 2011'))"`; \
if [ -n "$oldmerges" ]; then \
echo $b ; \
fi; \
done
</pre>