comparison .bash_profile @ 83:c4dccb49471b

HG tests changed * Rather than updating from local->WC every time, test if 'id' == 'tip'. This may break on a branch, but 1) there shouldn't be branches here and 2) I can fix that later. * Not only test incoming, but outgoing as well; this will flush out if there's been a checkin but no push.
author Steve Huston <huston@srhuston.net>
date Tue, 23 Apr 2013 13:11:51 -0400
parents f77bb4bb6ed9
children 3f1ead4ba8b4
comparison
equal deleted inserted replaced
82:0b67280c980c 83:c4dccb49471b
48 if ssh-add -l > /dev/null 2>&1 ; then 48 if ssh-add -l > /dev/null 2>&1 ; then
49 echo , running a status test. 49 echo , running a status test.
50 # hg incoming returns 0 if there's changes, 1 if there isn't 50 # hg incoming returns 0 if there's changes, 1 if there isn't
51 # The goal will then be to only touch .dotfilets if there's no changes 51 # The goal will then be to only touch .dotfilets if there's no changes
52 # upstream 52 # upstream
53 hg -q incoming || touch $HOME/.dotfilets & 53 hg -q incoming || hg -q outgoing || touch $HOME/.dotfilets &
54 disown %+ 54 disown %+
55 else 55 else
56 echo , but no keys loaded yet - add SSH keys and retrigger test. 56 echo , but no keys loaded yet - add SSH keys and retrigger test.
57 fi 57 fi
58 esac 58 esac
60 60
61 # Meanwhile, local changes are not costly and don't require a trip down the 61 # Meanwhile, local changes are not costly and don't require a trip down the
62 # network, so we can afford to run them any time. Make sure there's nothing 62 # network, so we can afford to run them any time. Make sure there's nothing
63 # to pull from the local repository to the working directory and the working 63 # to pull from the local repository to the working directory and the working
64 # directory is clean. 64 # directory is clean.
65 hg -q checkout -c || hg status 65 if [ "`hg -q tip | sed 's/.*://'`" != "`hg -q id | sed 's/\+//'`" ] ; then
66 echo Local repository contains updates.
67 fi
68 hg status