Changeset c85bb3b74b44…
Parent 8ee3b7de9099…
by
Changes to 2 files · Browse files at c85bb3b74b44 Showing diff from parent 8ee3b7de9099 Diff from another changeset...
@@ -94,7 +94,6 @@ """
QAbstractTableModel.__init__(self, parent)
self.datacache = {}
- self.hasmq = False
self.mqueues = []
self.wd_revs = []
self.graph = None
@@ -133,9 +132,7 @@ # might occur if reloading during a mq operation (or
# whatever operation playing with hg history)
return
- self.hasmq = hasattr(self.repo, "mq")
- if self.hasmq:
- self.mqueues = self.repo.mq.series[:]
+ self.mqueues = hglib.getmqpatchtags(self.repo)
self.wd_revs = [ctx.rev() for ctx in wdctxs]
grapher = revision_grapher(self.repo, start_rev=None,
follow=False, branch=branch)
@@ -431,8 +428,7 @@ return hglib.tounicode(",".join(tags))
def getlog(self, ctx, gnode):
- # TODO: add branch name / bookmark / patches /
- # wd parent markups
+ # TODO: add branch name / bookmark / wd parent markups
if ctx.rev() is None:
return '** ' + _('Working copy changes') + ' **'
@@ -442,7 +438,11 @@
tstr = ''
for tag in (hglib.getctxtags(ctx) or []):
- style = {'fg': "black", 'bg': '#ffffaa'}
+ bg = '#ffffaa'
+ if tag in self.mqueues:
+ bg = '#aaddff'
+ style = {'fg': "black", 'bg': bg}
+
tstr += qtlib.markup(' %s ' % tag, **style) + ' '
return tstr + msg
|
@@ -191,6 +191,13 @@ return tags
return None
+def getmqpatchtags(repo):
+ '''Returns all tag names used by MQ patches, or []'''
+ if hasattr(repo, 'mq'):
+ repo.mq.parse_series()
+ return repo.mq.series[:]
+ else:
+ return []
def diffexpand(line):
'Expand tabs in a line of diff/patch text'
|
Loading...