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

Re: doing a diff between the trunk and a tag

From: John Szakmeister <john_at_szakmeister.net>
Date: 2003-08-20 01:53:27 CEST

On Tuesday 19 August 2003 19:20, Wesley J Landaker wrote:
> On Tuesday 19 August 2003 3:54 am, John Szakmeister wrote:
> > On Monday 18 August 2003 23:22, Wesley J Landaker wrote:
> > > There is one thing that came up a bunch today a few times while I
> > > was trying to view some changes between various tags, and I wonder
> > > if there is a good way to do it that I'm missing:
> > >
> > > In CVS, if I had TAG1 and TAG2, and I wanted to see what changed
> > > between them, I'd say:
> > >
> > > cvs diff -rTAG1 -rTAG2
> > >
> > > So in subversion, if I have:
> > >
> > > /trunk
> > > /branch/tag1
> > > /branch/tag2
> > >
> > > I basically wanted to do:
> > >
> > > svn diff --old branch/tag1 --new branch/tag2
> >
> > It appears that the way you typed this that branch/tag1 and
> > branch/tag2 are in your working copy. That's probably not the case.
>
> No, I really do have them all in my working copy. I use branches and
> tags *reeeeallly* heavily in some projects, so I'll often check out my
> working directory from the repository root.

Wow. I honestly don't know why that doesn't work then... Hmmm, maybe I'll
fire up gdb and take a look at that. It sounds like a bug to me... or as the
error says, it just hasn't been implemented yet. I'm going to let one of the
more active Subversion developers answer this one.

> > You could do this though:
> >
> > svn diff --old=http://my.svnrepo.com/branch/tag1 \
> > --new=http://my.svnrepo.com/branch/tag2
> >
> > This would perform a diff between HEAD revisions of each branch in
> > the repo.
>
> This does work, why doesn't this work giving working copies instead?
>
> Take this tiny example:
>
> $ svn info
> Path:
> Url: file:///tmp/repos
> Revision: 0
> Node Kind: directory
> Schedule: normal
>
> $ ls
> branch/ trunk/
>
> $ ls branch
> tag1/ tag2/
>
> $ svn diff --old=file:///tmp/repos/branch/tag1
> --new=file:///tmp/repos/branch/tag2
>
> (that works)
>
> $ svn diff --old=branch/tag1 --new=branch/tag2
> svn: Incorrect parameters given
> svn: Sorry, svn_client_diff was called in a way that is not yet
> supported.
> svn: do_diff: paths aren't equal!
>
> (that doesn't work!)
>
> It seems like it should, because of the following from 'svn diff
> --help':
>
> diff (di): display the differences between two paths.
> usage: 1. diff [-r N[:M]] [--old OLD-TGT] [--new NEW-TGT] [PATH ...]
> 2. diff -r N:M URL
> 3. diff [-r N[:M]] URL1[@N] URL2[@M]
>
> 1. Display the differences between OLD-TGT and NEW-TGT. PATHs, if
> given, are relative to OLD-TGT and NEW-TGT and restrict the output
> to differences for those paths. ***OLD-TGT and NEW-TGT may be
> working copy paths or URL[@REV].*** (emphasis mine)
>
> OLD-TGT defaults to the path '.' and NEW-TGT defaults to OLD-TGT.
> N defaults to "BASE" or, if OLD-TGT is an URL, to "HEAD".
> M defaults to the current working version or, if NEW-TGT is an URL,
> to "HEAD".
>
> '-r N' sets the revision of OLD-TGT to N, '-r N:M' also sets the
> revision of NEW-TGT to M.
>
>
> In #1, this seems to say pretty clearly that it can be a URL or a
> working version. Maybe this is a bug or a "wishlist" kind of feature,
> but it seems like the documentation supports this format.

I'd agree. I'll try and investigate this a little bit.

> Anyway, thanks for the message. I can at least do what I need to with
> the longer URI format, but it seems like it should work this other way
> as well, since I have all the branches checked out.

-John

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Wed Aug 20 01:52:24 2003

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