Kiln » TortoiseHg » TortoiseHg
Clone URL:  
Pushed to one repository · View In Graph Contained in 1.0, 1.0.1, and 1.0.2

Merge with stable

Changeset 3af85f5c10d1

Parents 27a0f2d22ddf

Parents 4395e2ee6c5f

by Steve Borho

Changes to 7 files · Browse files at 3af85f5c10d1 Showing diff from parent 27a0f2d22ddf 4395e2ee6c5f Diff from another changeset...

Added image
 
289
290
291
292
 
293
294
295
 
304
305
306
307
 
308
309
310
 
289
290
291
 
292
293
294
295
 
304
305
306
 
307
308
309
310
@@ -289,7 +289,7 @@
  buf.insert_with_tags_by_name(eob, link, 'issuelink')   if pos < len(desc):   buf.insert(eob, desc[pos:]) - buf.insert(eob, '\n\n') + buf.insert(eob, desc.rstrip('\n\r') + '\n\n')     def append_diff(self, wfile):   if not wfile: @@ -304,7 +304,7 @@
  fctx = self.repo[rev].filectx(wfile)   except hglib.LookupError:   fctx = None - if fctx and fctx.size() > hglib.getmaxdiffsize(self.ui): + if fctx and fctx.size() > hglib.getmaxdiffsize(self.repo.ui):   lines = ['diff',   _(' %s is larger than the specified max diff size') % wfile]   else:
 
28
29
30
31
32
 
 
 
 
33
34
 
 
 
 
35
36
37
 
47
48
49
50
51
 
52
53
54
 
 
 
 
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
 
 
 
72
73
 
 
 
 
 
 
 
 
 
74
75
76
 
80
81
82
 
83
84
85
 
28
29
30
 
 
31
32
33
34
35
 
36
37
38
39
40
41
42
 
52
53
54
 
 
55
56
57
58
59
60
61
62
63
64
 
 
65
 
 
 
 
 
 
 
 
 
 
 
 
66
67
68
69
 
70
71
72
73
74
75
76
77
78
79
80
81
 
85
86
87
88
89
90
91
@@ -28,10 +28,15 @@
 class BranchOperationDialog(gtk.Dialog):   def __init__(self, branch, close, mergebranches):   gtk.Dialog.__init__(self, parent=None, flags=gtk.DIALOG_MODAL, - buttons=(gtk.STOCK_CANCEL, gtk.RESPONSE_CANCEL, - gtk.STOCK_OK, gtk.RESPONSE_OK)) + buttons=(gtk.STOCK_OK, gtk.RESPONSE_OK, + gtk.STOCK_CANCEL, gtk.RESPONSE_CANCEL), + title=_('Branch Operations')) + gtklib.set_tortoise_icon(self, 'branch.ico')   gtklib.set_tortoise_keys(self) - self.set_title(_('Branch Operations')) + self.set_resizable(False) + self.set_has_separator(False) + self.connect('response', self.response) +   self.newbranch = None   self.closebranch = False   @@ -47,30 +52,30 @@
  self.show_all()   return   - self.connect('response', self.response) - lbl = gtk.Label(_('Changes take effect on next commit')) + # create widgets   nochanges = gtk.RadioButton(None, _('No branch changes'))   self.newbranchradio = gtk.RadioButton(nochanges,   _('Open a new named branch')) + self.newbranchradio.set_active(True) + self.newbranchradio.connect('toggled', self.nbtoggle) + self.branchentry = gtk.Entry() + self.branchentry.connect('activate', self.activated)   self.closebranchradio = gtk.RadioButton(nochanges,   _('Close current named branch')) - self.branchentry = gtk.Entry() - self.branchentry.connect('activate', self.activated)   - hbox = gtk.HBox() - hbox.pack_start(self.newbranchradio, False, False, 2) - hbox.pack_start(self.branchentry, True, True, 2) - self.vbox.pack_start(hbox, True, True, 2) - hbox = gtk.HBox() - hbox.pack_start(self.closebranchradio, True, True, 2) - self.vbox.pack_start(hbox, True, True, 2) - hbox = gtk.HBox() - hbox.pack_start(nochanges, True, True, 2) - self.vbox.pack_start(hbox, True, True, 2) - self.vbox.pack_start(lbl, True, True, 10) - self.newbranchradio.connect('toggled', self.nbtoggle) + # layout table + table = gtklib.LayoutTable() + self.vbox.pack_start(table, True, True, 2)   - self.newbranchradio.set_active(True) + lbl = gtk.Label() + lbl.set_markup(gtklib.markup(_('Changes take effect on next commit'), + weight='bold')) + table.add_row(lbl, padding=False, ypad=6) + table.add_row(self.newbranchradio, self.branchentry) + table.add_row(self.closebranchradio) + table.add_row(nochanges) + + # prepare to show   if branch:   self.newbranch = branch   self.branchentry.set_text(branch) @@ -80,6 +85,7 @@
  self.closebranchradio.set_active(True)   else:   nochanges.set_active(True) +   self.show_all()     def nbtoggle(self, radio):
 
84
85
86
87
 
88
89
90
 
84
85
86
 
87
88
89
90
@@ -84,7 +84,7 @@
    def load_settings(self, settings):   gdialog.GDialog.load_settings(self, settings) - self.tabwidth = hglib.gettabwidth(self.ui) + self.tabwidth = hglib.gettabwidth(self.repo.ui)     def get_body(self):   """ Initialize the Dialog. """
 
34
35
36
37
38
 
 
39
40
41
42
43
44
 
45
46
47
 
55
56
57
58
 
 
59
60
61
62
63
64
65
66
 
 
67
68
69
 
84
85
86
87
88
 
89
90
91
 
34
35
36
 
 
37
38
39
40
41
42
43
 
44
45
46
47
 
55
56
57
 
58
59
60
61
62
63
64
65
 
 
66
67
68
69
70
 
85
86
87
 
 
88
89
90
91
@@ -34,14 +34,14 @@
  SimpleMessage.__init__(self, parent, gtk.DIALOG_MODAL,   type, gtk.BUTTONS_CLOSE)   self.set_title('TortoiseHg') - self.set_markup('<b>' + hglib.toutf(title) + '</b>') - self.format_secondary_markup(hglib.toutf(message)) + self.set_markup(gtklib.markup(hglib.toutf(title), weight='bold')) + self.format_secondary_text(hglib.toutf(message))   mod = gtklib.get_thg_modifier()   key, modifier = gtk.accelerator_parse(mod+'Return')   accel_group = gtk.AccelGroup()   self.add_accel_group(accel_group)   buttons = self.get_children()[0].get_children()[1].get_children() - buttons[0].add_accelerator("clicked", accel_group, key, + buttons[0].add_accelerator('clicked', accel_group, key,   modifier, gtk.ACCEL_VISIBLE)    class CustomPrompt(gtk.MessageDialog): @@ -55,15 +55,16 @@
  gtk.MessageDialog.__init__(self, parent, gtk.DIALOG_MODAL,   gtk.MESSAGE_QUESTION)   self.set_title(hglib.toutf(title)) - self.format_secondary_markup('<b>' + hglib.toutf(message) + '</b>') + self.format_secondary_markup(gtklib.markup(hglib.toutf(message), + weight='bold'))   accel_group = gtk.AccelGroup()   self.add_accel_group(accel_group)   for i, s in enumerate(choices):   button = self.add_button(s.replace('&', '_'), i)   try:   char = s[s.index('&')+1].lower() - button.add_accelerator('clicked', accel_group, ord(char), 0, - gtk.ACCEL_VISIBLE) + button.add_accelerator('clicked', accel_group, ord(char), + 0, gtk.ACCEL_VISIBLE)   except ValueError:   pass   if default: @@ -84,8 +85,7 @@
  SimpleMessage.__init__(self, parent, gtk.DIALOG_MODAL,   gtk.MESSAGE_QUESTION, gtk.BUTTONS_YES_NO)   self.set_title(hglib.toutf(title)) - primary = '<b>' + primary + '</b>' - self.set_markup(hglib.toutf(primary)) + self.set_markup(gtklib.markup(hglib.toutf(primary), weight='bold'))   message = ''   for i, f in enumerate(files):   message += ' ' + f + '\n'
 
501
502
503
504
505
506
507
 
651
652
653
 
654
655
656
 
1569
1570
1571
1572
1573
1574
1575
 
1720
1721
1722
1723
1724
1725
1726
 
1739
1740
1741
1742
1743
1744
1745
 
1753
1754
1755
1756
1757
1758
1759
 
1761
1762
1763
1764
 
 
 
 
 
 
 
1765
1766
1767
1768
1769
 
1770
1771
1772
 
1988
1989
1990
1991
1992
1993
1994
 
501
502
503
 
504
505
506
 
650
651
652
653
654
655
656
 
1569
1570
1571
 
1572
1573
1574
 
1719
1720
1721
 
1722
1723
1724
 
1737
1738
1739
 
1740
1741
1742
 
1750
1751
1752
 
1753
1754
1755
 
1757
1758
1759
 
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
 
1771
1772
1773
1774
 
1990
1991
1992
 
1993
1994
1995
@@ -501,7 +501,6 @@
  self.changeview.load_details(self.currevid)     def repo_invalidated(self, mqwidget): - self.changeview.clear_cache()   self.reload_log()     def prepare_display(self): @@ -651,6 +650,7 @@
  def reload_log(self, **kwopts):   'Send refresh event to treeview object'   self.update_hide_merges_button() + self.changeview.clear_cache()     opts = {'date': None, 'no_merges':False, 'only_merges':False,   'keyword':[], 'branch':None, 'pats':[], 'filehist':None, @@ -1569,7 +1569,6 @@
  def strip_rev(self, menuitem):   def strip_completed():   self.repo.invalidate() - self.changeview.clear_cache()   self.reload_log()   self.changeview.clear()   rev = self.currevid @@ -1720,7 +1719,6 @@
  dialog.run()   dialog.hide()   self.repo.invalidate() - self.changeview.clear_cache()   self.reload_log()   self.changeview.clear()   self.enable_mqpanel() @@ -1739,7 +1737,6 @@
  dialog.run()   dialog.hide()   self.repo.invalidate() - self.changeview.clear_cache()   self.reload_log()   self.changeview.clear()   @@ -1753,7 +1750,6 @@
  dialog.run()   dialog.hide()   self.repo.invalidate() - self.changeview.clear_cache()   self.reload_log()   self.changeview.clear()   @@ -1761,12 +1757,18 @@
  # save tag info for detecting new tags added   oldtags = self.repo.tagslist()   oldlen = len(self.repo) - rev = self.currevid + rev = str(self.currevid) + for t in self.repo.nodetags(self.repo[rev].node()): + if t != 'tip': + tag = t + break; + else: + tag = ''     def refresh(*args):   self.refresh_on_marker_change(oldlen, oldtags, self.repo.tagslist())   - dialog = tagadd.TagAddDialog(self.repo, rev=str(rev)) + dialog = tagadd.TagAddDialog(self.repo, tag, rev)   dialog.connect('destroy', refresh)   self.show_dialog(dialog)   @@ -1988,7 +1990,6 @@
  dialog.run()   dialog.hide()   self.repo.invalidate() - self.changeview.clear_cache()   self.reload_log()   self.changeview.clear()  
 
89
90
91
92
 
93
94
95
 
96
97
98
99
100
101
102
103
104
105
 
106
107
108
 
 
 
 
109
110
111
 
89
90
91
 
92
93
94
 
95
96
97
98
 
99
100
101
102
103
 
104
105
106
107
108
109
110
111
112
113
114
@@ -89,23 +89,26 @@
    # prepare to show   self.load_settings() - self._refresh() + self._refresh(clear=False)   self._taglistbox.grab_focus()   - def _refresh(self): + def _refresh(self, clear=True):   """ update display on dialog with recent repo data """   self.repo.invalidate()   self._tagslist.clear() - self._tag_input.set_text("")     # add tags to drop-down list   tags = [x[0] for x in self.repo.tagslist()]   tags.sort()   for tagname in tags: - if tagname == "tip": + if tagname == 'tip':   continue   self._tagslist.append([tagname])   + # clear tag input + if clear: + self._tag_input.set_text('') +   def load_settings(self):   expanded = self.settings.get_value('expanded', False, True)   self.expander.set_property('expanded', expanded)