fu: Close-up of Fu, bringing a scoop of water to her mouth (Default)
fu ([personal profile] fu) wrote2011-02-21 02:33 pm

Put together some bash scripts to determine which repositories we've modified

I just stuck this in my .bashrc file, to let me easily find out which repositories have had commits since the last time it was tagged, so I can put a new tag on it:


codepush_all() {
    #for dir in `find . -type d -depth 1`
    for dir in dw-free dw-nonfree bml s2 vcv js
    do
        echo -e "** looking in $dir\n"
        if [[ -e "$dir/.hg" ]]
        then
            cd $dir
            codepush
            cd ..
        fi
    done
}
codepush() {
    distance=$(( $( hg log -l1 --template '{latesttagdistance}' ) - 1 ))
    if (( "$distance" >= 1 ))
    then
        echo "$distance commits since " $( hg log -l1 --template '{latesttag}' )
        hg log -l $distance --style=changelog
    fi
}


Post a comment in response:

From:
Anonymous( )Anonymous This account has disabled anonymous posting.
OpenID( )OpenID You can comment on this post while signed in with an account from many other sites, once you have confirmed your email address. Sign in using OpenID.
User
Account name:
Password:
If you don't have an account you can create one now.
Subject:
HTML doesn't work in the subject.

Message:

 
Notice: This account is set to log the IP addresses of everyone who comments.
Links will be displayed as unclickable URLs to help prevent spam.