Mercurial > index.cgi > dotfiles
changeset 78:10c8cd44bf0a
Changed 'svn' logic for monthly tests to 'hg'
author | Steve Huston <huston@srhuston.net> |
---|---|
date | Sun, 21 Apr 2013 21:11:06 -0400 |
parents | 6d3478364b5d |
children | 4a09583afaac |
files | .bash_profile |
diffstat | 1 files changed, 16 insertions(+), 13 deletions(-) [+] |
line wrap: on
line diff
--- 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