[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: Alan Barrett <apb_at_cequrux.com>
Date: 2005-11-03 17:35:40 CET

On Thu, 03 Nov 2005, John Peacock wrote:
> 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 doesn't help much in the general case. Remember that the
"/gcc/" in the above example could easily be something more like
"/gcc/fixinc/tests/base/arch/i960/", and users don't want to type all
that stuff. Here's the example again with the long path:

Subversion as it exists today:

   $ svn checkout \
        svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-3_4-branch \
        gcc-3_4
   $ cd gcc-3_4/gcc/fixinc/tests/base/arch/i960
   $ svn diff \
        --old svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-4_0-branch/gcc/fixinc/tests/base/arch/i960/archI960.h \
        --new archI960.h

With the proposed "+" syntax (assuming that "gcc" is part of the repository
name, not a top level directory inside the repository):

   $ svn checkout \
        svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-3_4-branch \
        gcc-3_4
   $ cd gcc-3_4/gcc/fixinc/tests/base/arch/i960
   $ svn diff \
        --old +/branches/gcc-4_0-branch/gcc/fixinc/tests/base/arch/i960/archI960.h \
        --new archI960.h

With John Peacock's proposed syntax (ignoring ambiguity issues for now):

   $ svn checkout \
        svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-3_4-branch \
        gcc-3_4
   $ cd gcc-3_4/gcc/fixinc/tests/base/arch/i960
   $ svn diff \
        --old gcc-4_0-branch/gcc/fixinc/tests/base/arch/i960/archI960.h \
        --new archI960.h

With Greg Hudson's proposed syntax (and with appropriate transformation
rules for "B#branchname"):

   $ svn checkout \
        svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-3_4-branch \
        gcc-3_4
   $ cd gcc-3_4/gcc/fixinc/tests/base/arch/i960
   $ svn diff -r B#gcc-4_0-branch archI960.h

With CVS:

   $ cvs -d :ext:username@gcc.gnu.org:/cvs checkout -r gcc-3_4-branch gcc \
        gcc-3_4
   $ cd gcc-3_4/gcc/fixinc/tests/base/arch/i960
   $ cvs diff -r gcc-4_0-branch archI960.h

--apb (Alan Barrett)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Thu Nov 3 17:37:11 2005

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