Perforce is a commercial version control system that seems to share some CVS and SVN features. Besides his shortcomings and weaknesses it has very useful feature: automatic merge tracking.
But sometimes you want to know what commits were already merged and what not. The simplest method to obtain such information is to try merge commits separately (so called cherry-picks) and then check merge results reported by “p4 resolve”. It’s very slow and boring method. Can it be automated?
(more…)
A typical problem: some work must be done outside the office, but remote services needed are restricted only to office IP address (or some of them are behing VPN). If the service is available under single static port it will be pretty easy to tunnel the connection using SSH.
Tunnel: means you can access the service port as it’s available locally. It’s not a proxy (however ssh can act as HTTP proxy if configured).
I’ll show practical example: Perforce server begind VPN must be accessed outside office. First, configure it using ~/.ssh/config (more elegant solution):
(more…)
Sometimes you want to avoid running second instance of some shell script. Locking implementation is not very hard:
LOCK_FILE=$0.lock
test -f $LOCK_FILE && {
PID=`cat $LOCK_FILE`
echo "$LOCK_FILE exists, PID=$PID, exiting"
exit 1
}
echo $$ > $LOCK_FILE
trap "rm $LOCK_FILE" 0 2 3 15