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

Re: PROPOSAL: URL-syntax (Was: Re: Official revision syntax for Subversion URLs)

From: Jack Repenning <jrepenning_at_collab.net>
Date: 2003-08-05 18:58:17 CEST

At 9:26 AM +0200 8/5/03, SLOGEN wrote:
>I propose an alternate notation:
>
>Add any revision-encoding to the repository path, example:
>
> http://svn.foo/repository;1234/dir/file
>
>The ";" could be whatever you like, just something unusual will be best.
>
>Pros:
>
> - It captures the exact philosophy behind subversion, that
>repositories have revisions, not files.

I like this part.

> - It allows _any_ file-names representable in URL notation

Well ... all you've done is move the point of incompatibility up to
the top. It still means some repository names can't be specified
without quoting or similar.

> - It makes relative URL's work (moving to ./file2 gives you rev.
>1234, not HEAD)

Again, only if the ../ trail does not pass through the root (the
point with the mark-up)

> - It's easily usable for scripts/cmd-line, no escaping

You lost me, here. So far as I can see, scripts and command lines are
sensitive to their own favorite characters no matter where in the
path they may be, and escaping is always required.

OTOH, this notation is easy for scripts in another way: it preserves
the "anonymously rooted subtree" structure. That is, the path inside
the work area is identically the path for this annotated URL
(assuming, of course, there have been no changes in the tree). It's
pretty common to script your way over the tree, and it's easier if
the revision info can be parked in a constant representing the
"other-version" repository, rather than interpolating it into each
string. For example:

        find src -name \*.java |
        while read javafile; do
                svn diff http://svn.com/repo;123/$javafile \
                            http://svn.com/repo;456/$javafile
        done

-- 
-==-
Jack Repenning
CollabNet, Inc.
8000 Marina Boulevard, Suite 600
Brisbane, California 94005
o: 650.228.2562
c: 408.835-8090
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Tue Aug 5 18:59:51 2003

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.