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

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

From: George Wieggers <g.wieggers_at_zonnet.nl>
Date: 2005-01-05 22:26:28 CET

Hi,

IMHO TortoiseSVN should be able to do a "diff" on added files. Let me
try to explain why.

svn allows you to do the following

- svn add foo.txt
- svn diff foo.txt

(will show the entire file in the diff)

- svn commit
- svn cp foo.txt bar.txt

(now edit bar.txt)

- svn diff bar.txt

(svn diff will show your modifications)

This isn't possible in TortoiseSVN yet, because the "diff" command is
supressed for every "added" file.

The patch at the bottom of this message enables the diff command for
added files.
I've built and tested this patch and it works as expected.
... it took me a couple of hours to do a full build, but the
instructions in build.txt were very helpful :-)

I hope you will find this patch usefull.

Greetings, George

Index: src/TortoiseShell/ContextMenu.cpp
===================================================================
--- src/TortoiseShell/ContextMenu.cpp (revision 2330)
+++ src/TortoiseShell/ContextMenu.cpp (working copy)
@@ -518,7 +518,7 @@
         lastSeparator = idCmd++;
     }
 
- if
((isInSVN)&&(!isNormal)&&(isOnlyOneItemSelected)&&(!isFolder)&&(!isConflicted)&&(!isAdded))
+ if
((isInSVN)&&(!isNormal)&&(isOnlyOneItemSelected)&&(!isFolder)&&(!isConflicted))
         InsertSVNMenu(ownerdrawn, ISTOP(MENUDIFF),
HMENU(MENUDIFF),INDEXMENU(MENUDIFF), idCmd++, IDS_MENUDIFF, IDI_DIFF,
idCmdFirst, Diff);
 
     if (files_.size() == 2) //compares the two selected files

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tortoisesvn.tigris.org
For additional commands, e-mail: dev-help@tortoisesvn.tigris.org
Received on Wed Jan 5 22:33: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.