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

Re: [TSVN] "diff" command in context menu when selecting an added file

From: SteveKing <stefankueng_at_gmail.com>
Date: 2005-01-06 10:31:20 CET

On Thu, 06 Jan 2005 09:18:13 +0000, Will Dean <svn@indcomp.co.uk> wrote:
> At 08:56 06/01/2005 +0100, you wrote:
>
> >_after_ the commit, it has a base, yes. But not before! And after a
> >commit, you only have moved/copied the file and not added new. That's
> >a little bit different.
>
> Stefan,
>
> I think the OP has presented this in a rather confusing fashion, but does
> have a genuine point.

I think so too. Enabling the diff for added/moved/copied files would
be good. I just think it's not working correctly with the patch sent
here.

> He's talking about the special-case where you SVN copy a committed file
> (which makes the copy show as 'added', but it *does* have a base). Then
> you modify the copied file, and before you commit, you want to see the diff
> from the original.
>
> Because the file is copied from a committed file, it *does* have a base, so
> diffing against the base is a legitimate thing to do, which I imagine could
> actually be useful.
>
> I don't think his patch is quite right though, because in the most common
> case of an added file, there is no sense in allowing diff, and the current
> behaviour is correct.

Or, you could just assume that all visual diff programs can handle non
existing files and just assume empty files for those (as TortoiseMerge
does).

> I would suggest that if a file is 'added', we then check for the existence
> of a base-file and only offer the diff option if the base exists. I think
> this might be somewhat tedious to do, because GetPristinePath isn't
> currently available in the shell extension.

I haven't tested that, but what does GetPristinePath() return for a
moved file? and for a copied file?

> Otherwise, as you say, you're trusting that the merge program can cope with
> empty files.

I think that would be the easiest way to deal with it. But it would
definitely need a FAQ entry because people _will_ complain about their
diff tool not working.

Stefan

-- 
       ___
  oo  // \\      "De Chelonian Mobile"
 (_,\/ \_/ \     TortoiseSVN
   \ \_/_\_/>    The coolest Interface to (Sub)Version Control
   /_/   \_\     http://tortoisesvn.tigris.org
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tortoisesvn.tigris.org
For additional commands, e-mail: dev-help@tortoisesvn.tigris.org
Received on Thu Jan 6 10:31:55 2005

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

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