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

Re: Auto-subst of repository roots

From: John Peacock <jpeacock_at_rowman.com>
Date: 2005-11-03 16:10:23 CET

Julian Foad wrote:
> Alan Barrett wrote:
>> On Thu, 03 Nov 2005, Greg Hudson wrote:
>>
>>> In http://svn.haxx.se/dev/archive-2005-05/1367.shtml I outlined a more
>>> complicated proposal which saves significantly more typing. I'm not
>>> sure it's a good idea, but I do think we should be aiming higher than
>>> just repository root substitution.
>>
>> I agree that we should aim higher, and your proposed syntax looks
>> promising.
>
> Yes. Sorry that proposal didn't get much attention (from me at least)
> before.

Rather than going down that road, I wonder if it wouldn't be enough to
create a fallback to the existing path resolution. Suppose we take the
following long query (as mentioned earlier in the discussion):

svn diff
--old svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-4_0-branch/gcc/file.c
--new file.c

where the WC in question was, say, checked out from:

svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-3_4-branch/

We could simplify that command to:

svn diff
--old gcc-4_0-branch/gcc/file.c
--new file.c

(NOTE the lack of a leading slash in old). That would be interpreted
like this:

1) First the "old" path would be searched for in the current WC (which
is the existing behavior) and it wouldn't be found;

2) Next, the "old" path would be decomposed into the two directories and
  filename, and the fully qualified "new" path (from the WC files) would
have the last two directories stripped off;

3) Then the common remaining portion of the "new" path would have the
two specified directories from the "old" path appended and the diff once
again attempted;

4) If this still doesn't work, the current error could be printed along
with a suggestion to try a fully specified URL.

5) If both "old" and "new" contained path's that do not exist in the
current WC, then they both have to contain enough information to locate
the actual path in the repository, as offset from the current WC location.

As long as either old or new parameter contained enough context to
specify the common path in the repository, then the WC's repos_root term
would always be sufficient to determine the fully qualified path at any
point.

Does that make any sense, or do I need to create some ASCII art and
pseudo-code?

John

-- 
John Peacock
Director of Information Research and Technology
Rowman & Littlefield Publishing Group
4501 Forbes Boulevard
Suite H
Lanham, MD  20706
301-459-3366 x.5010
fax 301-429-5748
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Thu Nov 3 16:10:47 2005

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