[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: CVS like environment?

From: Bob Proulx <bob_at_proulx.com>
Date: 2005-07-05 22:25:45 CEST

Sensei wrote:
> Bob Proulx wrote:
> >svnlabco()
> >{
> > svn checkout scheme://host/path/$1 $1
> >}
>
> Yes, all I found useful is not specifying the remote each time, and
> having a single script that works with every command using $@...

Okay. Then how about this?

svnlab()
{
    case $1 in
        co|checkout)
            SVNROOT=scheme://host/path/
            PROJECT=$2
            shift 2
            svn checkout "$@" $SVNROOT/trunk/$PROJECT $PROJECT
            ;;
        *)
            svn "$@"
            ;;
    esac
}

Note that $@ is different from "$@". You almost always want "$@" and
not $@.

Bob

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Tue Jul 5 22:46:36 2005

This is an archived mail posted to the Subversion Users mailing list.