def getlog(self, ctx, gnode): if ctx.rev() is None: msg = None if self.unicodestar: # The Unicode symbol is a black star: msg = u'\u2605 ' + _('Working Directory') + u' \u2605' else: msg = '*** ' + _('Working Directory') + ' ***' for pctx in ctx.parents(): if self.repo._branchheads and pctx.node() not in self.repo._branchheads: text = _('Not a head revision!') msg += " " + qtlib.markup(text, fg='red', weight='bold') return msg msg = ctx.longsummary() if ctx.thgmqunappliedpatch(): effects = qtlib.geteffect('log.unapplied_patch') text = qtlib.applyeffects(' %s ' % ctx._patchname, effects) # qtlib.markup(msg, fg=UNAPPLIED_PATCH_COLOR) msg = qtlib.markup(msg) return hglib.tounicode(text + ' ') + msg if ctx.hidden(): return qtlib.markup(msg, fg=HIDDENREV_COLOR) parts = [] if ctx.thgbranchhead(): branchu = hglib.tounicode(ctx.branch()) effects = qtlib.geteffect('log.branch') parts.append(qtlib.applyeffects(u' %s ' % branchu, effects)) for mark in ctx.bookmarks(): style = 'log.bookmark' if mark == self.repo._bookmarkcurrent: bn = self.repo._bookmarks[self.repo._bookmarkcurrent] if bn in self.repo.dirstate.parents(): style = 'log.curbookmark' marku = hglib.tounicode(mark) effects = qtlib.geteffect(style) parts.append(qtlib.applyeffects(u' %s ' % marku, effects)) for tag in ctx.thgtags(): if self.repo.thgmqtag(tag): style = 'log.patch' else: style = 'log.tag' tagu = hglib.tounicode(tag) effects = qtlib.geteffect(style) parts.append(qtlib.applyeffects(u' %s ' % tagu, effects)) if msg: if ctx.thgwdparent(): msg = qtlib.markup(msg, weight='bold') else: msg = qtlib.markup(msg) parts.append(hglib.tounicode(msg)) return ' '.join(parts)
def getlog(self, ctx, gnode): if ctx.rev() is None: msg = None if self.unicodestar: # The Unicode symbol is a black star: msg = u'\u2605 ' + _('Working Directory') + u' \u2605' else: msg = '*** ' + _('Working Directory') + ' ***' for pctx in ctx.parents(): if self.repo._branchheads and pctx.node( ) not in self.repo._branchheads: text = _('Not a head revision!') msg += " " + qtlib.markup(text, fg='red', weight='bold') return msg msg = ctx.longsummary() if ctx.thgmqunappliedpatch(): effects = qtlib.geteffect('log.unapplied_patch') text = qtlib.applyeffects(' %s ' % ctx._patchname, effects) # qtlib.markup(msg, fg=UNAPPLIED_PATCH_COLOR) msg = qtlib.markup(msg) return hglib.tounicode(text + ' ') + msg parts = [] if ctx.thgbranchhead(): branchu = hglib.tounicode(ctx.branch()) effects = qtlib.geteffect('log.branch') parts.append(qtlib.applyeffects(u' %s ' % branchu, effects)) for mark in ctx.bookmarks(): style = 'log.bookmark' if mark == self.repo._bookmarkcurrent: bn = self.repo._bookmarks[self.repo._bookmarkcurrent] if bn in self.repo.dirstate.parents(): style = 'log.curbookmark' marku = hglib.tounicode(mark) effects = qtlib.geteffect(style) parts.append(qtlib.applyeffects(u' %s ' % marku, effects)) for tag in ctx.thgtags(): if self.repo.thgmqtag(tag): style = 'log.patch' else: style = 'log.tag' tagu = hglib.tounicode(tag) effects = qtlib.geteffect(style) parts.append(qtlib.applyeffects(u' %s ' % tagu, effects)) if msg: if ctx.thgwdparent(): msg = qtlib.markup(msg, weight='bold') else: msg = qtlib.markup(msg) parts.append(hglib.tounicode(msg)) return ' '.join(parts)
def getlog(self, ctx, gnode): if ctx.rev() is None: msg = None if self.unicodestar: # The Unicode symbol is a black star: msg = u"\u2605 " + _("Working Directory") + u" \u2605" else: msg = "*** " + _("Working Directory") + " ***" for pctx in ctx.parents(): if self.repo._branchheads and pctx.node() not in self.repo._branchheads: text = _("Not a head revision!") msg += " " + qtlib.markup(text, fg="red", weight="bold") return msg msg = ctx.longsummary() if ctx.thgmqunappliedpatch(): effects = qtlib.geteffect("log.unapplied_patch") text = qtlib.applyeffects(" %s " % ctx._patchname, effects) # qtlib.markup(msg, fg=UNAPPLIED_PATCH_COLOR) msg = qtlib.markup(msg) return hglib.tounicode(text + " ") + msg parts = [] if ctx.thgbranchhead(): branchu = hglib.tounicode(ctx.branch()) effects = qtlib.geteffect("log.branch") parts.append(qtlib.applyeffects(u" %s " % branchu, effects)) for mark in ctx.bookmarks(): style = "log.bookmark" if mark == self.repo._bookmarkcurrent: bn = self.repo._bookmarks[self.repo._bookmarkcurrent] if bn in self.repo.dirstate.parents(): style = "log.curbookmark" marku = hglib.tounicode(mark) effects = qtlib.geteffect(style) parts.append(qtlib.applyeffects(u" %s " % marku, effects)) for tag in ctx.thgtags(): if self.repo.thgmqtag(tag): style = "log.patch" else: style = "log.tag" tagu = hglib.tounicode(tag) effects = qtlib.geteffect(style) parts.append(qtlib.applyeffects(u" %s " % tagu, effects)) if msg: if ctx.thgwdparent(): msg = qtlib.markup(msg, weight="bold") else: msg = qtlib.markup(msg) parts.append(hglib.tounicode(msg)) return " ".join(parts)
def addtotal(files, style): effects = qtlib.geteffect(style) text = qtlib.applyeffects(" %s " % len(files), effects) changes.append(text)
def addtotal(files, style): effects = qtlib.geteffect(style) text = qtlib.applyeffects(' %s ' % len(files), effects) changes.append(text)