Kiln » TortoiseHg » TortoiseHg
Clone URL:  
Pushed to one repository · View In Graph Contained in 2.0.3, 2.0.4, and 2.0.5

stable Merge with hgtk

Changeset fcadbfb1d6bd

Parents ecbe2d08b7f9

Parents 5cf3e36d5c10

by Steve Borho

Changes to 4 files · Browse files at fcadbfb1d6bd Showing diff from parent ecbe2d08b7f9 5cf3e36d5c10 Diff from another changeset...

 
10
11
12
13
14
 
15
16
17
 
20
21
22
23
24
25
26
27
28
29
30
31
 
50
51
52
53
54
55
56
57
 
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
 
 
 
 
 
 
 
 
 
 
 
97
98
99
100
101
 
102
103
104
105
106
107
108
109
110
111
 
120
121
122
123
124
125
126
127
 
 
 
 
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
 
155
156
157
158
159
160
161
162
163
 
164
165
166
 
176
177
178
179
180
181
182
183
 
190
191
192
193
 
194
195
196
197
198
199
 
200
201
202
 
215
216
217
218
219
220
221
222
223
224
 
245
246
247
248
249
250
251
252
253
254
 
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
 
 
346
347
348
349
350
351
 
352
353
354
 
 
355
356
357
358
359
360
361
 
 
362
363
 
 
364
365
366
367
368
369
 
370
371
372
 
 
373
374
375
376
377
378
379
380
381
382
383
 
 
10
11
12
 
 
13
14
15
16
 
19
20
21
 
22
23
24
25
 
26
27
28
 
47
48
49
 
 
50
51
52
 
67
68
69
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
70
71
72
73
74
75
76
77
78
79
80
81
82
83
 
 
84
85
86
 
 
87
88
 
89
90
91
 
100
101
102
 
 
 
 
 
103
104
105
106
107
108
109
110
111
 
 
 
 
 
 
 
 
 
 
 
 
112
113
114
 
122
123
124
 
 
 
125
126
 
127
128
129
130
 
140
141
142
 
 
143
144
145
 
152
153
154
 
155
156
157
158
159
160
 
161
162
163
164
 
177
178
179
 
 
 
 
180
181
182
 
203
204
205
 
 
 
 
206
207
208
 
269
270
271
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
272
 
273
274
275
 
 
 
 
 
276
277
278
 
279
280
281
 
 
 
 
 
 
282
283
284
 
285
286
287
 
 
 
 
 
288
289
290
 
291
292
293
294
 
 
 
 
 
 
 
 
 
295
@@ -10,8 +10,7 @@
 import gtk  import traceback   -from mercurial import ui, util -from hgext import bookmarks +from mercurial import ui, util, commands    from tortoisehg.util.i18n import _  from tortoisehg.util import hglib, i18n, settings @@ -20,12 +19,10 @@
   TYPE_ADDREMOVE = 1  TYPE_RENAME = 2 -TYPE_CURRENT = 3    RESPONSE_ADD = 1  RESPONSE_REMOVE = 2  RESPONSE_RENAME = 3 -RESPONSE_CURRENT = 4  RESPONSE_MOVE = 5    class BookmarkDialog(gtk.Dialog): @@ -50,8 +47,6 @@
  self.add_button(_('Remove'), RESPONSE_REMOVE)   elif type == TYPE_RENAME:   self.add_button(_('Rename'), RESPONSE_RENAME) - elif type == TYPE_CURRENT: - self.add_button(_('Set Current'), RESPONSE_CURRENT)   else:   raise _('unexpected type: %s') % type   self.add_button(gtk.STOCK_CLOSE, gtk.RESPONSE_CLOSE) @@ -72,40 +67,25 @@
  table.add_row(label, self._bookmarklistbox, padding=False)     ## add entry - if type == TYPE_CURRENT: - entry = None - else: - entry = gtk.Entry() - if type == TYPE_ADDREMOVE: - self._rev_input = entry - entry.set_width_chars(12) - entry.set_text(rev) - label = _('Revision:') - elif type == TYPE_RENAME: - self._name_input = entry - label = _('New Name:') - table.add_row(label, entry, padding=False) - - # Option to make new bookmark the active one - trackcurrent = self.repo.ui.configbool('bookmarks', 'track.current') - if type == TYPE_ADDREMOVE and trackcurrent: - check = gtk.CheckButton(_('Make new/moved bookmark current')) - self.opt_newcurrent = check - check.set_sensitive(hglib.is_rev_current(self.repo, rev)) - table.add_row(None, check) - + entry = gtk.Entry() + if type == TYPE_ADDREMOVE: + self._rev_input = entry + entry.set_width_chars(12) + entry.set_text(rev) + label = _('Revision:') + elif type == TYPE_RENAME: + self._name_input = entry + label = _('New Name:') + table.add_row(label, entry, padding=False) +   # signal handlers   self.connect('response', self.dialog_response)   self._bookmark_input.connect('activate', self.entry_activated, type) - if entry: - entry.connect('activate', self.entry_activated, type) + entry.connect('activate', self.entry_activated, type)   if type == TYPE_ADDREMOVE:   self._bookmark_input.connect('changed', self.bookmark_changed) - if trackcurrent: - self._rev_input.connect('changed', self.rev_changed)     # prepare to show - self.load_settings()   if type == TYPE_ADDREMOVE:   self.set_add_move_button_sensitivity()   self._refresh(clear=False) @@ -120,28 +100,15 @@
  self._bookmarkslist.clear()     # add bookmarks to drop-down list - bookmarks = hglib.get_repo_bookmarks(self.repo) - bookmarks.sort() - for bookmarkname in bookmarks: - if bookmarkname != 'tip': - self._bookmarkslist.append([bookmarkname]) + marks = self.repo._bookmarks.keys() + marks.sort() + for mark in marks: + self._bookmarkslist.append([mark])     # clear bookmark name input   if clear:   self._bookmark_input.set_text('')   - def load_settings(self): - if hasattr(self, 'opt_newcurrent'): - newcurrent = self.settings.get_value('newcurrent', False) - self.opt_newcurrent.set_active(newcurrent) - - def store_settings(self): - if hasattr(self, 'opt_newcurrent'): - newcurrent = self.opt_newcurrent.get_active() - self.settings.set_value('newcurrent', newcurrent) - - self.settings.write() -   def dialog_response(self, dialog, response_id):   # Add button   if response_id == RESPONSE_ADD: @@ -155,12 +122,9 @@
  # Rename button   elif response_id == RESPONSE_RENAME:   self._do_rename_bookmark() - # Set Current button - elif response_id == RESPONSE_CURRENT: - self._do_current_bookmark()   # Close button or closed by the user   elif response_id in (gtk.RESPONSE_CLOSE, gtk.RESPONSE_DELETE_EVENT): - self.store_settings() + self.settings.write()   self.destroy()   return # close dialog   else: @@ -176,8 +140,6 @@
  self.response(RESPONSE_MOVE)   elif type == TYPE_RENAME:   self.response(RESPONSE_RENAME) - elif type == TYPE_CURRENT: - self.response(RESPONSE_CURRENT)   else:   raise _('unexpected type: %s') % type   @@ -190,13 +152,13 @@
    def set_add_move_button_sensitivity(self):   mark = self._bookmark_input.get_text() - if mark in hglib.get_repo_bookmarks(self.repo): + if mark in self.repo._bookmarks:   self._button_add.set_sensitive(False)   self._button_move.set_sensitive(True)   else:   self._button_add.set_sensitive(True)   self._button_move.set_sensitive(False) - +     def _do_add_bookmark(self):   # gather input data @@ -215,10 +177,6 @@
  self._add_hg_bookmark(name, rev)   dialog.info_dialog(self, _('Bookmarking completed'),   _('Bookmark "%s" has been added') % name) - if (hasattr(self, 'opt_newcurrent') and - self.opt_newcurrent.get_property('sensitive') and - self.opt_newcurrent.get_active()): - self._current_hg_bookmark(name)   self._refresh()   except util.Abort, inst:   dialog.error_dialog(self, _('Error in bookmarking'), str(inst)) @@ -245,10 +203,6 @@
  self._move_hg_bookmark(name, rev)   dialog.info_dialog(self, _('Bookmarking completed'),   _('Bookmark "%s" has been moved') % name) - if (hasattr(self, 'opt_newcurrent') and - self.opt_newcurrent.get_property('sensitive') and - self.opt_newcurrent.get_active()): - self._current_hg_bookmark(name)   self._refresh()   except util.Abort, inst:   dialog.error_dialog(self, _('Error in bookmarking'), str(inst)) @@ -315,69 +269,27 @@
  traceback.format_exc())   return False   - def _do_current_bookmark(self): - # gather input data - name = self._bookmark_input.get_text() - - # verify input - if name == '': - dialog.error_dialog(self, _('Bookmark input is empty'), - _('Please enter bookmark name')) - self._bookmark_input.grab_focus() - return False - - # set current bookmark - try: - self._current_hg_bookmark(name) - dialog.info_dialog(self, _('Bookmarking completed'), - _('Bookmark "%s" has been made current') % - name) - self._refresh() - except util.Abort, inst: - dialog.error_dialog(self, _('Error in bookmarking'), str(inst)) - return False - except: - dialog.error_dialog(self, _('Error in bookmarking'), - traceback.format_exc()) - return False -   def _add_hg_bookmark(self, name, revision): - if name in hglib.get_repo_bookmarks(self.repo): + repo = self.repo + if name in repo._bookmarks:   raise util.Abort(_('a bookmark named "%s" already exists') % name) - - bookmarks.bookmark(ui=ui.ui(), - repo=self.repo, - rev=revision, - mark=name) + commands.bookmark(repo.ui, repo, name, revision, True)     def _move_hg_bookmark(self, name, revision): - if name not in hglib.get_repo_bookmarks(self.repo): + repo = self.repo + if name not in repo._bookmarks:   raise util.Abort(_('No bookmark named "%s" exists') % name) - bookmarks.bookmark(ui=ui.ui(), - repo=self.repo, - rev=revision, - mark=name, - force=True) - + commands.bookmark(repo.ui, repo, name, revision, True) +   def _remove_hg_bookmark(self, name): - if not name in hglib.get_repo_bookmarks(self.repo): + repo = self.repo + if not name in repo._bookmarks:   raise util.Abort(_("Bookmark '%s' does not exist") % name) - - bookmarks.bookmark(ui=ui.ui(), - repo=self.repo, - mark=name, - delete=True) + commands.bookmark(repo.ui, repo, name, None, True, True)     def _rename_hg_bookmark(self, name, new_name): - if new_name in hglib.get_repo_bookmarks(self.repo): + repo = self.repo + if new_name in repo._bookmarks:   raise util.Abort(_('a bookmark named "%s" already exists') %   new_name) - bookmarks.bookmark(ui=ui.ui(), - repo=self.repo, - mark=new_name, - rename=name) - - def _current_hg_bookmark(self, name): - if name not in hglib.get_repo_bookmarks(self.repo): - raise util.Abort(_('No bookmark named "%s" exists') % name) - bookmarks.setcurrent(self.repo, name) + commands.bookmark(repo.ui, repo, new_name, None, True, False, name)
 
360
361
362
363
 
364
365
366
 
523
524
525
526
 
527
528
529
 
1139
1140
1141
1142
 
1143
1144
1145
 
1169
1170
1171
1172
 
1173
1174
1175
 
1328
1329
1330
1331
 
1332
1333
1334
 
1337
1338
1339
1340
 
1341
1342
1343
1344
1345
1346
1347
1348
 
 
1349
1350
1351
1352
 
1353
1354
1355
 
1374
1375
1376
1377
 
1378
1379
1380
 
1408
1409
1410
1411
 
1412
1413
1414
 
1428
1429
1430
1431
 
1432
1433
1434
 
1632
1633
1634
1635
 
1636
1637
1638
 
1891
1892
1893
1894
 
1895
1896
1897
 
2010
2011
2012
2013
 
2014
2015
2016
 
2451
2452
2453
2454
 
2455
2456
2457
 
2491
2492
2493
2494
 
2495
2496
2497
 
2509
2510
2511
2512
 
2513
2514
2515
2516
2517
2518
2519
2520
 
2521
2522
2523
 
2526
2527
2528
2529
 
2530
2531
2532
2533
2534
2535
2536
 
2537
2538
2539
2540
2541
2542
 
2543
2544
2545
2546
2547
2548
2549
2550
 
 
2551
2552
2553
2554
2555
2556
2557
 
 
2558
2559
2560
 
2640
2641
2642
2643
 
2644
2645
2646
 
2649
2650
2651
2652
 
2653
2654
2655
 
2658
2659
2660
2661
 
2662
2663
2664
 
360
361
362
 
363
364
365
366
 
523
524
525
 
526
527
528
529
 
1139
1140
1141
 
1142
1143
1144
1145
 
1169
1170
1171
 
1172
1173
1174
1175
 
1328
1329
1330
 
1331
1332
1333
1334
 
1337
1338
1339
 
1340
1341
 
 
 
 
 
 
 
1342
1343
1344
1345
1346
 
1347
1348
1349
1350
 
1369
1370
1371
 
1372
1373
1374
1375
 
1403
1404
1405
 
1406
1407
1408
1409
 
1423
1424
1425
 
1426
1427
1428
1429
 
1627
1628
1629
 
1630
1631
1632
1633
 
1886
1887
1888
 
1889
1890
1891
1892
 
2005
2006
2007
 
2008
2009
2010
2011
 
2446
2447
2448
 
2449
2450
2451
2452
 
2486
2487
2488
 
2489
2490
2491
2492
 
2504
2505
2506
 
2507
2508
2509
2510
2511
2512
2513
 
 
2514
2515
2516
2517
 
2520
2521
2522
 
2523
2524
2525
2526
2527
2528
2529
 
2530
2531
2532
2533
2534
2535
 
2536
2537
 
 
 
 
 
2538
 
2539
2540
2541
2542
2543
2544
2545
 
 
2546
2547
2548
2549
2550
 
2630
2631
2632
 
2633
2634
2635
2636
 
2639
2640
2641
 
2642
2643
2644
2645
 
2648
2649
2650
 
2651
2652
2653
2654
@@ -360,7 +360,7 @@
  if self.repo.ui.configbool('tortoisehg', 'disable-syncbar'):   sync_bar_item = []   else: - sync_bar_item = [dict(text=_('Sync Bar'), ascheck=True, + sync_bar_item = [dict(text=_('Sync Bar'), ascheck=True,   func=self.toggle_show_syncbar, check=self.show_syncbar)]     # MQ extension menu @@ -523,7 +523,7 @@
  active = button.get_active()   if self.compactgraph != active:   self.compactgraph = active - self.reload_log() + self.reload_log()     def toggle_showoutput(self, button):   active = button.get_active() @@ -1139,7 +1139,7 @@
  self.origtip = min(len(self.repo), self.origtip)   if not self.bfile:   self.npreviews = 0 - +   opts['branch-view'] = self.compactgraph   opts['outgoing'] = self.outgoing   opts['orig-tip'] = self.origtip @@ -1169,7 +1169,7 @@
  if self.no_merges:   graphcol = False   - filterprefix = _('Filter') + filterprefix = _('Filter')   filtertext = filterprefix + ': '   if self.filter == 'branch':   branch = opts.get('branch', None) @@ -1328,7 +1328,7 @@
  return menu     def export_context_menu(self): - m = gtklib.MenuBuilder() + m = gtklib.MenuBuilder()   m.append(_('_Export Patch...'), self.export_patch, 'menupatch.ico')   m.append(_('E_mail Patch...'), self.email_patch, gtk.STOCK_GOTO_LAST)   m.append(_('_Bundle rev:tip...'), self.bundle_rev_to_tip, @@ -1337,19 +1337,14 @@
  return m.build()     def tags_context_menu(self): - m = gtklib.MenuBuilder() + m = gtklib.MenuBuilder()   m.append(_('Add/Remove _Tag...'), self.add_tag) - if 'bookmarks' in self.exs: - m.append(_('Add/Move/Remove B_ookmark...'), self.add_bookmark) - m.append(_('Rename Bookmark...'), self.rename_bookmark, - gtk.STOCK_EDIT) - if self.repo.ui.configbool('bookmarks', 'track.current'): - m.append(_('Set Current Bookmark...'), self.current_bookmark, - gtk.STOCK_YES) + m.append(_('Add/Move/Remove B_ookmark...'), self.add_bookmark) + m.append(_('Rename Bookmark...'), self.rename_bookmark, gtk.STOCK_EDIT)   return m.build()     def mq_context_menu(self): - m = gtklib.MenuBuilder() + m = gtklib.MenuBuilder()   mqimport = m.append(_('Import Revision to MQ'), self.qimport_rev,   'menuimport.ico')   mstrip = m.append(_('Strip Revision...'), self.strip_rev, @@ -1374,7 +1369,7 @@
  return m.build()     def bisect_context_menu(self): - m = gtklib.MenuBuilder() + m = gtklib.MenuBuilder()   m.append(_('Reset'), self.bisect_reset, gtk.STOCK_CLEAR)   m.append(_('Mark as Good'), self.bisect_good, gtk.STOCK_YES)   m.append(_('Mark as Bad'), self.bisect_bad, gtk.STOCK_NO) @@ -1408,7 +1403,7 @@
  m.append_sep()   mmerge = m.append(_('_Merge with...'), self.domerge, 'menumerge.ico')   m.append_sep() - +   # disable/enable menus as required   parents = self.repo.parents()   if len(parents) > 1: @@ -1428,7 +1423,7 @@
  if 'rebase' in self.exs:   m.append(_('Rebase on top of selected'), self.rebase_selected,   gtk.STOCK_CUT) - +   # need MQ extension for qimport command   if 'mq' in self.exs:   m.append(_('Import from here to selected to MQ'), @@ -1632,7 +1627,7 @@
    # filter bar   self.filterbar = FilterBar(self.tooltips, - self.filter_mode, + self.filter_mode,   hglib.getlivebranch(self.repo),   self.repo)   filterbar = self.filterbar @@ -1891,7 +1886,7 @@
    self.toolbar.insert(reject, 0)   self.toolbar.insert(apply, 0) - +   self.cmd_set_sensitive('accept', True)   self.cmd_set_sensitive('reject', True)   @@ -2010,7 +2005,7 @@
  else:   cmd += ['--quiet', '--template', '{node}\n']   cmd += self.get_proxy_args() - cmd += [hglib.validate_synch_path(path, self.repo)] + cmd += [hglib.validate_synch_path(path, self.repo)]     def callback(return_code, buffer, *args):   if return_code == 0: @@ -2451,7 +2446,7 @@
  'command has completed'), self).run()     def rebase_selected(self, menuitem): - """Rebase revision on top of selection (1st on top of 2nd).""" + """Rebase revision on top of selection (1st on top of 2nd)."""   revs = self.revrange   res = gdialog.Confirm(_('Confirm Rebase Revision'), [], self,   _('Rebase revision %d on top of %d?') % (revs[0], revs[1])).run() @@ -2491,7 +2486,7 @@
    def add_tag(self, menuitem):   # save tag info for detecting new tags added - bmarks = hglib.get_repo_bookmarks(self.repo) + bmarks = self.repo._bookmarks.keys()   oldtags = self.repo.tagslist()   oldlen = len(self.repo)   rev = str(self.currevid) @@ -2509,15 +2504,14 @@
  # save bookmark info for detecting new bookmarks added   # since we can now move bookmarks, need to store   # the associated changesets as well - oldbookmarks = hglib.get_repo_bookmarks(self.repo, values=True) + oldbookmarks = self.repo._bookmarks   oldlen = len(self.repo)   rev = str(self.currevid)   bmark = self.get_rev_tag(rev, include=oldbookmarks)     def refresh(*args):   self.refresh_on_marker_change(oldlen, oldbookmarks, - hglib.get_repo_bookmarks(self.repo, - values=True)) + self.repo._bookmarks)     dialog = bookmark.BookmarkDialog(self.repo, bookmark.TYPE_ADDREMOVE,   bmark, rev) @@ -2526,35 +2520,31 @@
    def rename_bookmark(self, menuitem):   # save bookmark info for detecting bookmarks renamed - oldbookmarks = hglib.get_repo_bookmarks(self.repo) + oldbookmarks = self.repo._bookmarks   oldlen = len(self.repo)   rev = str(self.currevid)   bmark = self.get_rev_tag(rev, include=oldbookmarks)     def refresh(*args):   self.refresh_on_marker_change(oldlen, oldbookmarks, - hglib.get_repo_bookmarks(self.repo)) + self.repo._bookmarks)     dialog = bookmark.BookmarkDialog(self.repo, bookmark.TYPE_RENAME,   bmark, rev)   dialog.connect('destroy', refresh)   self.show_dialog(dialog) - +   def current_bookmark(self, menuitem): - # save current bookmark info for detecting current bookmark changed - bookmarks = extensions.find('bookmarks') - # Note that the dialog shouldn't change the repo len, or # of bookmarks, - # etc, but check in case they've been modified by something else... - oldbookmarks = hglib.get_repo_bookmarks(self.repo)   oldlen = len(self.repo) - oldcurrent = hglib.get_repo_bookmarkcurrent(self.repo) + oldbookmarks = self.repo._bookmarks + oldcurrent = self.repo._bookmarkcurrent   rev = str(self.currevid)   bmark = self.get_rev_tag(rev, include=oldbookmarks)     def refresh(*args):   self.refresh_on_current_marker_change(oldlen, oldbookmarks, oldcurrent, - hglib.get_repo_bookmarks(self.repo), - hglib.get_repo_bookmarkcurrent(self.repo)) + self.repo._bookmarks, + self.repo._bookmarkcurrent)     dialog = bookmark.BookmarkDialog(self.repo, bookmark.TYPE_CURRENT,   bmark, rev) @@ -2640,7 +2630,7 @@
  '(creating new heads if needed)?') % original_path   buttontext = _('Forced &Push')   confirm_push = True - +   if confirm_push:   dlg = gdialog.CustomPrompt(title, text,   None, (buttontext, _('&Cancel')), default=1, esc=1) @@ -2649,7 +2639,7 @@
  else:   return remote_path   else: - return remote_path + return remote_path     def push_branch(self, menuitem):   self.push_to(menuitem, branch=self.repo[self.currevid].branch()) @@ -2658,7 +2648,7 @@
  remote_path = self.validate_path()   if not remote_path:   return - +   node = self.repo[self.currevid].node()   rev = str(self.currevid)   if branch:
 
55
56
57
 
58
59
60
61
62
 
63
64
65
 
71
72
73
74
75
76
77
78
 
 
79
80
81
82
83
 
 
84
85
86
 
219
220
221
222
223
224
225
 
226
227
228
229
230
 
231
 
 
232
233
 
 
 
 
 
 
 
234
 
235
236
237
 
55
56
57
58
59
60
61
62
63
64
65
66
67
 
73
74
75
 
76
77
78
79
80
81
82
83
84
 
 
85
86
87
88
89
 
222
223
224
 
 
225
 
226
227
 
 
 
 
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
@@ -55,11 +55,13 @@
  self.graphdata = graphdata   self.revisions, self.parents = {}, {}   self.wcparents, self.tagrevs, self.branchtags = [], [], {} + self.bookmarkrevs = []   self.refresh()     def refresh(self):   repo = self.repo   oldtags, oldparents = self.tagrevs, self.wcparents + oldbookmarks = self.bookmarkrevs   try:   oldbranches = [repo[n].rev() for n in self.branchtags.values()]   except error.RepoLookupError: @@ -71,16 +73,17 @@
  self.set_author_color()   self.hidetags = hglib.gethidetags(repo.ui)   - self.curbookmark = hglib.get_repo_bookmarkcurrent(repo)   try:   self.wcparents = [x.rev() for x in repo.parents()]   self.tagrevs = [repo[r].rev() for t, r in repo.tagslist()]   self.branchtags = repo.branchtags() + self.curbookmark = repo._bookmarkcurrent + self.bookmarkrevs = [repo[n].rev() for n in repo._bookmarks.values()]   except util.Abort:   pass   brevs = [repo[n].rev() for n in self.branchtags.values()] - allrevs = set(oldtags + oldparents + oldbranches + - brevs + self.wcparents + self.tagrevs) + allrevs = set(oldtags + oldparents + oldbranches + oldbookmarks + + brevs + self.wcparents + self.tagrevs + self.bookmarkrevs)   for rev in allrevs:   if rev in self.revisions:   del self.revisions[rev] @@ -219,19 +222,24 @@
  escape = gtklib.markup_escape_text   summary = escape(hglib.toutf(summary))   - node = ctx.node() - tags = self.repo.nodetags(node)   tstr = '' - for tag in tags: + for tag in ctx.tags():   if tag not in self.hidetags: - bg = gtklib.PYELLOW - if tag == self.curbookmark: - bg = gtklib.PORANGE - elif tag in self.mqpatches: + if tag in self.mqpatches:   bg = gtklib.PBLUE + else: + bg = gtklib.PYELLOW   style = {'color': gtklib.BLACK, 'background': bg}   tstr += gtklib.markup(' %s ' % tag, **style) + ' ' + for mark in ctx.bookmarks(): + if mark == self.curbookmark: + bg = gtklib.PORANGE + else: + bg = gtklib.PLIME + style = {'color': gtklib.BLACK, 'background': bg} + tstr += gtklib.markup(' %s ' % mark, **style) + ' '   + node = ctx.node()   branch = ctx.branch()   bstr = ''   status = 0
 
249
250
251
 
 
 
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
 
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
 
249
250
251
252
253
254
255
256
257
258
259
 
 
 
 
 
 
 
 
 
 
 
 
 
 
260
261
262
 
552
553
554
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
555
556
557
@@ -249,25 +249,14 @@
   def invalidaterepo(repo):   repo.dirstate.invalidate() + for attr in ('_bookmarks', '_bookmarkcurrent'): + if attr in repo.__dict__: + delattr(repo, attr)   if isinstance(repo, bundlerepo.bundlerepository):   # Work around a bug in hg-1.3. repo.invalidate() breaks   # overlay bundlerepos   return   repo.invalidate() - # way _bookmarks / _bookmarkcurrent cached changed - # from 1.4 to 1.5... - for cachedAttr in ('_bookmarks', '_bookmarkcurrent'): - # Check if it's a property or normal value... - if is_descriptor(repo, cachedAttr): - # The very act of calling hasattr would - # re-cache the property, so just assume it's - # already cached, and catch the error if it wasn't. - try: - delattr(repo, cachedAttr) - except AttributeError: - pass - elif hasattr(repo, cachedAttr): - setattr(repo, cachedAttr, None)   if 'mq' in repo.__dict__: #do not create if it does not exist   repo.mq.invalidate()   @@ -563,59 +552,6 @@
  return_path = path_aux   return return_path   -def get_repo_bookmarks(repo, values=False): - """ - Will return the bookmarks for the given repo if the - bookmarks extension is loaded. - - By default, returns a list of bookmark names; if - values is True, returns a dict mapping names to - nodes. - - If the extension is not loaded, returns an empty - list/dict. - """ - try: - bookmarks = extensions.find('bookmarks') - except KeyError: - return values and {} or [] - if bookmarks: - # Bookmarks changed from 1.4 to 1.5... - if hasattr(bookmarks, 'parse'): - marks = bookmarks.parse(repo) - elif hasattr(repo, '_bookmarks'): - marks = repo._bookmarks - else: - marks = {} - else: - marks = {} - - if values: - return marks - else: - return marks.keys() - -def get_repo_bookmarkcurrent(repo): - """ - Will return the current bookmark for the given repo - if the bookmarks extension is loaded, and the - track.current option is on. - - If the extension is not loaded, or track.current - is not set, returns None - """ - try: - bookmarks = extensions.find('bookmarks') - except KeyError: - return None - if bookmarks and repo.ui.configbool('bookmarks', 'track.current'): - # Bookmarks changed from 1.4 to 1.5... - if hasattr(bookmarks, 'current'): - return bookmarks.current(repo) - elif hasattr(repo, '_bookmarkcurrent'): - return repo._bookmarkcurrent - return None -  def is_rev_current(repo, rev):   '''   Returns True if the revision indicated by 'rev' is the current