FindingOldBranches » History » Version 3

« Previous - Version 3/5 (diff) - Next » - Current version
Chris Cannam, 2012-02-02 09:32 AM


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:

$ 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'))"`; \
      [ -n "$oldmerges" ] && echo $b ; \
    done