mercurial/cmdutil.py
changeset 30694 5289fd78017a
parent 30620 bb77654dc7ae
child 30695 f05ede08dcf7
equal deleted inserted replaced
30693:baee0f47b533 30694:5289fd78017a
  1140                 tempnode2 = None
  1140                 tempnode2 = None
  1141             submatch = matchmod.subdirmatcher(subpath, match)
  1141             submatch = matchmod.subdirmatcher(subpath, match)
  1142             sub.diff(ui, diffopts, tempnode2, submatch, changes=changes,
  1142             sub.diff(ui, diffopts, tempnode2, submatch, changes=changes,
  1143                      stat=stat, fp=fp, prefix=prefix)
  1143                      stat=stat, fp=fp, prefix=prefix)
  1144 
  1144 
       
  1145 def _changesetlabels(ctx):
       
  1146     labels = ['log.changeset', 'changeset.%s' % ctx.phasestr()]
       
  1147     return ' '.join(labels)
       
  1148 
  1145 class changeset_printer(object):
  1149 class changeset_printer(object):
  1146     '''show changeset information when templating not requested.'''
  1150     '''show changeset information when templating not requested.'''
  1147 
  1151 
  1148     def __init__(self, ui, repo, matchfn, diffopts, buffered):
  1152     def __init__(self, ui, repo, matchfn, diffopts, buffered):
  1149         self.ui = ui
  1153         self.ui = ui
  1200 
  1204 
  1201         date = util.datestr(ctx.date())
  1205         date = util.datestr(ctx.date())
  1202 
  1206 
  1203         # i18n: column positioning for "hg log"
  1207         # i18n: column positioning for "hg log"
  1204         self.ui.write(_("changeset:   %d:%s\n") % revnode,
  1208         self.ui.write(_("changeset:   %d:%s\n") % revnode,
  1205                       label='log.changeset changeset.%s' % ctx.phasestr())
  1209                       label=_changesetlabels(ctx))
  1206 
  1210 
  1207         # branches are shown first before any other names due to backwards
  1211         # branches are shown first before any other names due to backwards
  1208         # compatibility
  1212         # compatibility
  1209         branch = ctx.branch()
  1213         branch = ctx.branch()
  1210         # don't show the default branch name
  1214         # don't show the default branch name