# 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

Reply via email to