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

Re: [TSVN] File diff - working copy against specific revision

From: Simon Large <simon_at_skirridsystems.co.uk>
Date: 2005-09-06 22:13:03 CEST

Stefan Küng wrote:
> Simon Large wrote:
>
>> > file selected to show the log: d:\test\wc\folder\file1
>> > that file has the URL in the repository :
>> > .../svn/project/trunk/folder/file1
>> > the item selected in the bottom pane has the relative URL :
>> > /trunk/myfolder/file3
>> ^^^^^^^^
>>
>> In that case you meant /folder/ ?
>
> No, I menat /myfolder/ - because if you search backwards for strings,
> you would end up with /trunk/my as the resultstring. You also have to
> take the slashes into account.

If you did ShowLog from within /folder/ to show the log for file1, then
surely ../myfolder/file3 is in a different part of the hierarchy. file1
and file3 are *not* in the same folder.

>> if (TargetIsFolder)
>> {
>> FolderURL = TargetURL;
>> }
>> else
>> {
>> FolderURL = ExtractParentFolder(TargetURL);
>> }
>>
>> if (strncmp(ThisURL, FolderURL, strlen(FolderURL)) == 0)
>> {
>> // This URL is in the same folder, or in a subfolder
>> }
>
>
> As mentioned in the example:
> - you only get a relative URL in the bottom pane (that's what you get
> when calling svn_client_log())
> - just comparing strings won't work, see my comment above.

It does if you are careful what you do with trailing slashes. In the
pseudocode example, you only need to make sure FolderURL includes the
trailing slash.

But as it works perfectly well from the top pane, I think I will give up
the argument ;-)

Simon

-- 
        ___
   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 Tue Sep 6 22:12:53 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.