# HG changeset patch
# User Adrian Buehlmann <adr...@cadifra.com>
# Date 1253885808 -7200
# Node ID 87c87a71a7c36f445e388374f3c2816516029e65
# Parent  1505dc27dab170c144c0c60279dd6b6acae5cb05
update: write 'unknown revision!' in target label

diff --git a/tortoisehg/hgtk/update.py b/tortoisehg/hgtk/update.py
--- a/tortoisehg/hgtk/update.py
+++ b/tortoisehg/hgtk/update.py
@@ -14,6 +14,7 @@ from mercurial import hg, ui
 
 from tortoisehg.util.i18n import _
 from tortoisehg.util import hglib, paths
+from tortoisehg.util.hglib import LookupError, RepoLookupError, RepoError
 
 from tortoisehg.hgtk import hgcmd, gtklib, gdialog
 
@@ -227,8 +228,9 @@ class UpdateDialog(gtk.Dialog):
             else:
                 setlabel(self.new_rev_label, self.repo[newrev])
                 self.updatebtn.set_sensitive(True)
-        except hglib.RepoError:
-            pass
+        except (LookupError, RepoLookupError, RepoError):
+            self.new_rev_label.set_label(_('unknown revision!'))
+            self.updatebtn.set_sensitive(False)
 
     def update(self, repo):
         cmdline = ['hg', 'update', '--verbose']

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