mercurial/cmdutil.py
changeset 45771 f90a5c211251
parent 45770 96fcc37a9c80
child 45796 e9555305c5c6
equal deleted inserted replaced
45770:96fcc37a9c80 45771:f90a5c211251
  1220     if not spec:
  1220     if not spec:
  1221         spec = ui.config(b'command-templates', b'oneline-summary')
  1221         spec = ui.config(b'command-templates', b'oneline-summary')
  1222     if not spec:
  1222     if not spec:
  1223         spec = default_spec
  1223         spec = default_spec
  1224     if not spec:
  1224     if not spec:
  1225         # TODO: Pick a default we can agree on. This isn't used yet.
  1225         spec = (
  1226         raise error.ProgrammingError(b"no default one-line summary defined yet")
  1226             b'{separate(" ", '
       
  1227             b'label("log.changeset", "{rev}:{node|short}")'
       
  1228             b', '
       
  1229             b'label("log.tag", tags)'
       
  1230             b', '
       
  1231             b'label("log.bookmark", bookmarks)'
       
  1232             b')} '
       
  1233             b'"{label("log.desc", desc|firstline)}"'
       
  1234         )
  1227     text = rendertemplate(ctx, spec)
  1235     text = rendertemplate(ctx, spec)
  1228     return text.split(b'\n')[0]
  1236     return text.split(b'\n')[0]
  1229 
  1237 
  1230 
  1238 
  1231 def _buildfntemplate(pat, total=None, seqno=None, revwidth=None, pathname=None):
  1239 def _buildfntemplate(pat, total=None, seqno=None, revwidth=None, pathname=None):