# HG changeset patch
# User Adrian Buehlmann <adr...@cadifra.com>
# Date 1253884066 -7200
# Node ID aa4502210e8a0d5ab54cb3e06fa20ee6fb86506f
# Parent  91eee16a74cbd19088cd8384064b1b3933b4e3fa
update: show "(same as parent)" for the target revision

diff --git a/tortoisehg/hgtk/update.py b/tortoisehg/hgtk/update.py
--- a/tortoisehg/hgtk/update.py
+++ b/tortoisehg/hgtk/update.py
@@ -213,11 +213,16 @@ class UpdateDialog(gtk.Dialog):
 
         ctxs = self.ctxs
         setlabel(self.current_rev_label1, ctxs[0])
-        if len(ctxs) == 2:
+        merge = len(ctxs) == 2
+        if merge:
             setlabel(self.current_rev_label2, ctxs[1])
         newrev = self.revcombo.get_active_text()
         try:
-            setlabel(self.new_rev_label, self.repo[newrev])
+            new_ctx = self.repo[newrev]
+            if not merge and new_ctx.rev() == ctxs[0].rev():
+                self.new_rev_label.set_label(_('(same as parent)'))
+            else:
+                setlabel(self.new_rev_label, self.repo[newrev])
         except hglib.RepoError:
             pass
 

------------------------------------------------------------------------------
Come build with us! The BlackBerry&reg; 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&#45;12, 2009. Register now&#33;
http://p.sf.net/sfu/devconf
_______________________________________________
Tortoisehg-develop mailing list
Tortoisehg-develop@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/tortoisehg-develop

Reply via email to