# HG changeset patch
# User Adrian Buehlmann <adr...@cadifra.com>
# Date 1253437518 -7200
# Node ID 6f745667e62cb3058814ef80480232639e1dc504
# Parent  f68ca68414b94f9f59d2e75c86e62d1c385a2471
update: use repo.dirstate.branch() instead of artificial BRANCH_TIP

We can use the real name of the current branch as default revision
to update to, instead of the artificial text '= Current Branch Tip ='.

diff --git a/tortoisehg/hgtk/update.py b/tortoisehg/hgtk/update.py
--- a/tortoisehg/hgtk/update.py
+++ b/tortoisehg/hgtk/update.py
@@ -17,8 +17,6 @@ from tortoisehg.util import hglib, paths
 
 from tortoisehg.hgtk import hgcmd, gtklib, gdialog
 
-BRANCH_TIP = _('= Current Branch Tip =')
-
 MODE_NORMAL   = 'normal'
 MODE_UPDATING = 'updating'
 
@@ -77,7 +75,7 @@ class UpdateDialog(gtk.Dialog):
         if rev != None:
             combo.append_text(str(rev))
         else:
-            combo.append_text(BRANCH_TIP)
+            combo.append_text(repo.dirstate.branch())
         combo.set_active(0)
         for b in repo.branchtags():
             combo.append_text(b)
@@ -164,9 +162,8 @@ class UpdateDialog(gtk.Dialog):
 
         cmdline = ['hg', 'update', '--verbose']
         rev = self.revcombo.get_active_text()
-        if rev != BRANCH_TIP:
-            cmdline.append('--rev')
-            cmdline.append(rev)
+        cmdline.append('--rev')
+        cmdline.append(rev)
         if self.opt_check.get_active():
             cmdline.append('--check')
         elif self.opt_clean.get_active():

------------------------------------------------------------------------------
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