Ah sorry.

I didn't know that.

What I was trying to solve was that there was no way to see the diff
to the second parent with "Visualize Change", since it always showed
only the diff to the first parent, no matter whether "other
parent" was activated or not (the list of files window always
showed only the files that changed compared to the first parent).

In contrast to the "Display Change" context menu command of the log
viewer, which correctly presented either the list of files that changed
with respect to the first parent (if "other parent" deactivated) or
with respect to the second parent (if "other parent" activated).

Should we add an extra test for when vdiffnowin is set then?
I.e. always only define

        opts['change'] = str(rev)

for merge csets if vdiffnowin is set?

What 3-way diff tool are you using and how have you configured it in .hgrc/
mercurial.ini? (If I knew that I could test your setup?)

I tested with kdiff3.

On 16.10.2009 10:59, Sune Foldager wrote:
> This patch and the other similar one, break the 'vdiffnowin' option which is 
> handled in visdiff.run. It bypasses the hgtk window and uses extdiff directly 
> (and hence enables 3-way diff of merge nodes with my latest accepted patch to 
> hg). These patches remove the necessary information ('change') to do this, 
> and revert to 2-way :-(.
> 
> Maybe instead of rewriting (and removing 'change'), just add the 'rev' and 
> then visdiff.run can remove rev if change is present and vdiffnowin is used, 
> or something. Not sure that's completely elegant either.
> 
> /Sune
>  
> On Thursday, October 15, 2009, at 07:43PM, "Adrian Buehlmann" 
> <adr...@cadifra.com> wrote:
>> # HG changeset patch
>> # User Adrian Buehlmann <adr...@cadifra.com>
>> # Date 1255628512 -7200
>> # Node ID 23e60a084681cef3cffad909c1b820b0b1696be9
>> # Parent  74061568b17f7b13047c62dd393d2a9af20e1dc2
>> history: respect "Diff to second Parent" when doing "Visualize Change"
>>
>> diff --git a/tortoisehg/hgtk/history.py b/tortoisehg/hgtk/history.py
>> --- a/tortoisehg/hgtk/history.py
>> +++ b/tortoisehg/hgtk/history.py
>> @@ -1473,7 +1473,17 @@ class GLog(gdialog.GDialog):
>>         dlg.hide()
>>
>>     def vdiff_change(self, menuitem, pats=[]):
>> -        opts = {'change':str(self.currevid), 'bundle':self.bfile}
>> +        opts = {'bundle':self.bfile}
>> +        rev = self.currevid
>> +        parents = self.repo[rev].parents()
>> +        if len(parents) == 2:
>> +            if self.changeview.other_parent_checkbutton.get_active():
>> +                parent = parents[1].rev()
>> +            else:
>> +                parent = parents[0].rev()
>> +            opts['rev'] = [str(parent), str(rev)]
>> +        else:
>> +            opts['change'] = str(rev)
>>         self._do_diff(pats, opts)
>>
>>     def vdiff_local(self, menuitem, pats=[]):
>>
>> ------------------------------------------------------------------------------
>> Come build with us! The BlackBerry(R) Developer Conference in SF, CA
>> is the only developer event you need to attend this year. Jumpstart your
>> developing skills, take BlackBerry mobile applications to market and stay 
>> ahead of the curve. Join us from November 9 - 12, 2009. Register now!
>> http://p.sf.net/sfu/devconference
>> _______________________________________________
>> Tortoisehg-develop mailing list
>> Tortoisehg-develop@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/tortoisehg-develop
>>
>>
> 
> 

-- 
Adrian Buehlmann
adr...@cadifra.com    Delfterstrasse 28
Tel +41 62 823 7015   5004 Aarau
Fax +41 62 823 7016   Switzerland

------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
Tortoisehg-develop mailing list
Tortoisehg-develop@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/tortoisehg-develop

Reply via email to