FindingOldBranches » History » Version 1

Version 1/5 - Next ยป - Current version
Chris Cannam, 2012-02-02 09:29 AM


Finding Old Branches

List 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 | \
    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