[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: George Wieggers <george.wieggers_at_gmail.com>
Date: 2005-01-06 08:24:39 CET

> On Wed, 05 Jan 2005 22:26:28 +0100, George Wieggers
> <g.wieggers@zonnet.nl> wrote:
>
> > 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)
>
> As a unified diff, yes.
>
> > - svn commit
> > - svn cp foo.txt bar.txt
> >
> > (now edit bar.txt)
> >
> > - svn diff bar.txt
> >
> > (svn diff will show your modifications)
>
> Again, as a unified diff.
>
> > This isn't possible in TortoiseSVN yet, because the "diff" command is
> > supressed for every "added" file.
>
> It's suppressed for a reason: a 'diff' on a working copy file always
> means comparing the working copy file with its base. And since added
> files don't have a base yet, this won't work at all.

This isn't true, I'm afraid. In this case, after the commit, foo.txt
has a base. As soon as you do a "svn cp foo.txt bar.txt", the
text-base of foo.txt also becomes the text-base of bar.txt in the .svn
area.

> > 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.
>
> You've tested that? I don't think so.

Before I created the patch, I used the latest version of tortoise and
tried this command

tortoiseproc /command:diff /path:"f:\test_wc\bar.txt"

Please give it a try, and you'll see that toirtoise is already able to do this.

> You're patch only activates the context menu 'diff' for added files)
> too. But I'm sure you haven't tested the actual diff command. It won't
> work! Because, as I mentioned above: added files don't have a base
> yet, so there's nothing to compare them with.

Again, I can assure you that I've built and tested this patch. To
prove my point: following the instructions in build.txt, I was able to
build the installer. However, build.txt doesn't specify which version
of the wix tools you need to install. The latest version (2.0.2419)
fails to generate an installer. Version 2.0.2110 works though. Maybe
worth mentioning in build.txt? ;-)

- George

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tortoisesvn.tigris.org
For additional commands, e-mail: dev-help@tortoisesvn.tigris.org
Received on Thu Jan 6 08:25:18 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.