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

Re: svn cat (was: Re: svn up -p)

From: Noel Yap <yap_noel_at_yahoo.com>
Date: 2002-11-12 14:42:54 CET

--- Ben Collins-Sussman <sussman@collab.net> wrote:
> Noel Yap <yap_noel@yahoo.com> writes:
> > Ben, does RA->get_file() work this way already?
>
> No, because it's part of the the RA (Repository
> Access) vtable. By
> definition, it only gets a file from a repository.
> To get a file's
> local contents, just apr_file_open(). Of course I
> can think of at
> least two plausible behaviors for 'svn cat
> localfile': either 1. cat
> the hidden text-base of localfile, or 2. just
> convert localfile into a
> url, and still get some version of the file from the
> repository. I'm
> not sure what you were thinking of.

Sorry I wasn't clear enough.

I expect "svn cat -r REV file" to output the contents
of file at revision REV and "svn cat file" to behave
like "svn cat -r BASE file". Does this make sense?

Since the base revision is cached locally, it would be
better if "svn cat file" used that cache. So, a
first-pass implementation that comes to mind is:
1. If no revision is specified, cat the cached
base-revision file. (If "blame" is to be implemented
with "cat -v" in the future, it would have to query
the server.)
2. Otherwise, convert the filename to a URL and query
the server.

The above makes sense to me, but as experience has
often shown, what makes sense to me can be complete
nonsense to someone else :-)

Noel

__________________________________________________
Do you Yahoo!?
U2 on LAUNCH - Exclusive greatest hits videos
http://launch.yahoo.com/u2

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Tue Nov 12 14:43:35 2002

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

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