[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: Christopher Ness <chris_at_nesser.org>
Date: 2005-07-04 20:12:18 CEST

On Mon, 2005-07-04 at 13:00 -0500, Sensei wrote:
> On Jul 4, 2005, at 12:49pm, Ben Collins-Sussman wrote:
> >
> > No, there's no way of not specifiying the URL. Typically, it
> > doesn't matter either. You checkout a working copy of the URL, and
> > then the working copy remembers it for you. Most commands don't
> > require a URL argument at all, or automatically use the one cached
> > in your working copy.
> >
> > You can also just use environment variables:
> >
> > export R=scheme://host/path
> > svn checkout $R/project working-copy
>
> My problem is with my students. I provide a .bashrc with useful
> command lines, like
>
> without caring about the environment... I wanted to do something like
> that for subversion:
>
> svn co myProject
> ...

Write a simple bash script called `svnget` put it in the students path.

usage: svnget MODULE [LOCALNAME]

`svnget` needs to know the structure of the repository, so it can
prepend the server name to the module argument. The one liner below
knows that all the modules live in the trunk of the repository.

#!/bin/sh
svn co method://server.ca/repos/trunk/$@

Then the students would use `svn diff` in the working copy directory
that is created with the module name - which doesn't require a URL once
the working copy is created.

This is a crutch and just shifts the fact that you need to remember to
use `svnget` instead of the URL of the repository. I feel the students
should learn how to do this themselves, but that's your call.

HTH's
Chris

-- 
Wireless Group,
McMaster University
finger.localdomain
14:01:51 up 4:13, 1 user, load average: 0.00, 0.04, 0.09
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Mon Jul 4 20:15:33 2005

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

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.