Kiln » TortoiseHg » TortoiseHg
Clone URL:  
Pushed to one repository · View In Graph Contained in 1.9.3, 2.0, and 2.0.1

stable thgrepo: bookmarks are now a core feature

Changeset baf41482ab3f

Parent 88c1f62633ed

by Steve Borho

Changes to 4 files · Browse files at baf41482ab3f Showing diff from parent 88c1f62633ed Diff from another changeset...

 
518
519
520
521
522
523
524
525
526
527
528
 
529
530
 
531
532
533
 
518
519
520
 
 
 
 
521
522
523
 
524
525
 
526
527
528
529
@@ -518,16 +518,12 @@
  effects = qtlib.geteffect('log.branch')   parts.append(qtlib.applyeffects(u' %s ' % branchu, effects))   - # in the near future, I expect bookmarks to be available from the - # repository via a separate API, making this logic more efficient. - bookmarks = self.repo.bookmarks.keys() - curbookmark = self.repo.bookmarkcurrent   for tag in ctx.thgtags():   if self.repo.thgmqtag(tag):   style = 'log.patch' - elif tag == curbookmark: + elif tag == self.repo._bookmarkcurrent:   style = 'log.curbookmark' - elif tag in bookmarks: + elif tag in self.repo._bookmarks:   style = 'log.bookmark'   else:   style = 'log.tag'
 
250
251
252
253
 
254
255
256
 
268
269
270
271
 
272
273
274
 
250
251
252
 
253
254
255
256
 
268
269
270
 
271
272
273
274
@@ -250,7 +250,7 @@
  for name in self.repo.namedbranches:   uname = hglib.tounicode(name)   self.targetcombo.addItem(_('branch: ') + uname, hexlify(name)) - for name, node in self.repo.bookmarks.items(): + for name, node in self.repo._bookmarks.items():   uname = hglib.tounicode(name)   self.targetcombo.addItem(_('bookmark: ') + uname, node)   @@ -268,7 +268,7 @@
  if ctx.thgbranchhead():   target = hexlify(ctx.branch())   for tag in ctx.thgtags(): - if tag in self.repo.bookmarks.keys(): + if tag in self.repo._bookmarks.keys():   target = ctx.node()     index = self.targetcombo.findData(target)
 
33
34
35
36
37
38
39
 
40
41
42
 
33
34
35
 
36
 
 
37
38
39
40
@@ -33,10 +33,8 @@
  self.repo = repo     if not tag and rev and rev != 'tip': - bmarks = repo.bookmarks.keys()   for t in repo.nodetags(repo[rev].node()): - if t != 'tip' \ - and ((not bmarks) or (bmarks and t not in bmarks)): + if t != 'tip' and t not in repo._bookmarks:   tag = t   break   else:
 
208
209
210
211
 
212
213
214
 
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
 
208
209
210
 
211
212
213
214
 
395
396
397
 
 
 
 
 
 
 
 
 
 
 
 
 
 
398
399
400
@@ -208,7 +208,7 @@
   _uiprops = '''_uifiles _uimtime _shell postpull tabwidth maxdiff   deadbranches _exts _thghiddentags displayname summarylen - shortname mergetools bookmarks bookmarkcurrent'''.split() + shortname mergetools'''.split()  _thgrepoprops = '''_thgmqpatchnames thgmqunappliedpatches   _branchheads'''.split()   @@ -395,20 +395,6 @@
  if n in openbrnodes and br not in dead)     @propertycache - def bookmarks(self): - if 'bookmarks' in self._exts and hasattr(self, '_bookmarks'): - return self._bookmarks - else: - return {} - - @propertycache - def bookmarkcurrent(self): - if 'bookmarks' in self._exts and hasattr(self, '_bookmarkcurrent'): - return self._bookmarkcurrent - else: - return None - - @propertycache   def _branchheads(self):   return [self.changectx(x) for x in self.branchmap()]