# HG changeset patch # User Steve Huston # Date 1366593066 14400 # Node ID 10c8cd44bf0a39c9169d8998ec5b3e14e93fecb9 # Parent 6d3478364b5d1a2165e21b54d63d27d19904a519 Changed 'svn' logic for monthly tests to 'hg' diff -r 6d3478364b5d -r 10c8cd44bf0a .bash_profile --- a/.bash_profile Sun Apr 21 14:12:54 2013 -0400 +++ b/.bash_profile Sun Apr 21 21:11:06 2013 -0400 @@ -26,11 +26,12 @@ # eval `/usr/bin/ssh-agent` #fi -# This part is quite useful if you have your dotfiles stored in subversion -# (though it could be edited fairly easily for any other version control -# system I'm sure). We check the timestamp of the file '$HOME/.dotfilets'. -# If it's older than a month, run a 'svn st -u' and touch it; this way we -# check once per month to see if we forgot to pull down an updated version. +# This part is quite useful if you have your dotfiles stored in version +# control (and it could be edited fairly easily for any version control system +# I'm sure). We check the timestamp of the file '$HOME/.dotfilets'. If it's +# older than a month, run a 'hg incoming' and touch it if nothing's changed; +# this way we check once per month to see if we forgot to pull down an updated +# version and keep getting reminders until we do. [[ ! -f $HOME/.dotfilets || \ `eval $DFSTAT` -lt `eval $MDATE` ]] && { @@ -44,17 +45,19 @@ ;; *) - if ssh-add -l > /dev/null 2>&1 ; then + if ssh-add -l > /dev/null 2>&1 ; then echo , running a status test. - [[ -d $HOME/.svn ]] && { - echo - echo " *** WARNING: Still using subversion here ***" - echo - svn st -u && touch $HOME/.dotfilets & - disown %+ - } + # hg incoming returns 0 if there's changes, 1 if there isn't + # The goal will then be to only touch .dotfilets if there's no changes + # upstream + hg -q incoming || touch $HOME/.dotfilets & + disown %+ else echo , but no keys loaded yet - add SSH keys and retrigger test. fi esac } + +# Meanwhile, local changes are not costly and don't require a trip down the +# network, so we can afford to run them any time. +hg status