[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:57:14 CET

On Thu, 06 Jan 2005 09:45:58 +0000, Will Dean <svn@indcomp.co.uk> wrote:

> >I haven't tested that, but what does GetPristinePath() return for a
> >moved file? and for a copied file?
>
> I think that a better way to deal with this might be to use the 'copied'
> flag in svn_wc_status_t, which seems to specifically cover this situation,
> and must be available 'for free'.

I wasn't talking about how to check if the menu item should be shown.
The 'diff' command in TSVN uses GetPristinePath() to get the file to
which the selected file should be compared to. Now, does
GetPristinePath() return the filepath to the sourcefile before the
copy/move? Or does it return an empty path?

> Unfortunately, GetAllStatus doesn't keep/return this info at the moment,
> and although lots of ugly hacks can be thought of to get around this, I
> don't have anything very elegant to mind at the moment.

GetAllStatus() doesn't. But GetStatus() does. GetStatus() returns an
svn_wc_status_t object (well, it doesn't return it, but it's
accessible) which has the copied flag in it.

> >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.
>
> Well, we could deal with that in the code which starts the external diff
> viewer, and not launch for non-existant files, or something like that.

But then diff viewers start implementing that 'feature' and what then?
Users complaining why TSVN doesn't allow it?

> I suppose a simple hack which wouldn't be *too* awful would be to have a
> flag in SVNStatus called something like m_bLastStatusQueryFoundCopiedFiles,
> and set this in the getallstatus callback if the copied flag is seen. Then
> the shell-extension can apply this appropriately. It would be meaningless
> when there are multiple files processed by GetAllStatus, but the shell
> extension is already specifically excluding that in this particular situation.

Why don't we use the shell status cache for the context menu too? I
mean, if you right-click on an item, it has to be visible in the
explorer, which means the overlay/columnhandler status cache most
likely already has that status ready!

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:58:02 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.