# HG changeset patch
# User Adrian Buehlmann <[email protected]>
# Date 1270027820 -7200
# Branch stable
# Node ID e479b15ff2c1777171d8c58c624416cfe0e62a79
# Parent 5b0faaf81fc7702b9428e23a42ad6d151b4dc86f
tagadd: fallback to initial rev if tag is not found
Fixes #1112
diff --git a/tortoisehg/hgtk/tagadd.py b/tortoisehg/hgtk/tagadd.py
--- a/tortoisehg/hgtk/tagadd.py
+++ b/tortoisehg/hgtk/tagadd.py
@@ -60,6 +60,7 @@ class TagAddDialog(gtk.Dialog):
self.reventry = gtk.Entry()
self.reventry.set_width_chars(12)
self.reventry.set_text(rev)
+ self.initial_rev = rev
self.reventry.connect('notify::text',
lambda *a: self.update_sensitives())
table.add_row(_('Revision:'), self.reventry)
@@ -120,6 +121,8 @@ class TagAddDialog(gtk.Dialog):
tagmap = self.repo.tags()
tag = self.tagentry.get_text()
if not tag or hglib.fromutf(tag) not in tagmap:
+ if self.initial_rev:
+ self.reventry.set_text(self.initial_rev)
return
node = tagmap[hglib.fromutf(tag)]
------------------------------------------------------------------------------
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Tortoisehg-develop mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/tortoisehg-develop