FindingOldBranches » History » Version 2

« Previous - Version 2/5 (diff) - Next » - Current version
Chris Cannam, 2012-02-02 09:31 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'))"`; \
      if [ -n "$oldmerges" ]; then \
        echo $b ; \
      fi; \
    done