hgext/patchbomb.py
changeset 40029 e2697acd9381
parent 39118 1415b78869eb
child 40293 c303d65d2e34
equal deleted inserted replaced
40028:51f10e6d66c7 40029:e2697acd9381
   185     elif introconfig == 'always':
   185     elif introconfig == 'always':
   186         intro = True
   186         intro = True
   187     elif introconfig == 'never':
   187     elif introconfig == 'never':
   188         intro = False
   188         intro = False
   189     elif introconfig == 'auto':
   189     elif introconfig == 'auto':
   190         intro = 1 < number
   190         intro = number > 1
   191     else:
   191     else:
   192         ui.write_err(_('warning: invalid patchbomb.intro value "%s"\n')
   192         ui.write_err(_('warning: invalid patchbomb.intro value "%s"\n')
   193                      % introconfig)
   193                      % introconfig)
   194         ui.write_err(_('(should be one of always, never, auto)\n'))
   194         ui.write_err(_('(should be one of always, never, auto)\n'))
   195         intro = 1 < number
   195         intro = number > 1
   196     return intro
   196     return intro
   197 
   197 
   198 def _formatflags(ui, repo, rev, flags):
   198 def _formatflags(ui, repo, rev, flags):
   199     """build flag string optionally by template"""
   199     """build flag string optionally by template"""
   200     tmpl = ui.config('patchbomb', 'flagtemplate')
   200     tmpl = ui.config('patchbomb', 'flagtemplate')
   661             missing = []
   661             missing = []
   662             for idx, h in enumerate(out):
   662             for idx, h in enumerate(out):
   663                 if not known[idx]:
   663                 if not known[idx]:
   664                     missing.append(h)
   664                     missing.append(h)
   665             if missing:
   665             if missing:
   666                 if 1 < len(missing):
   666                 if len(missing) > 1:
   667                     msg = _('public "%s" is missing %s and %i others')
   667                     msg = _('public "%s" is missing %s and %i others')
   668                     msg %= (publicurl, missing[0], len(missing) - 1)
   668                     msg %= (publicurl, missing[0], len(missing) - 1)
   669                 else:
   669                 else:
   670                     msg = _('public url %s is missing %s')
   670                     msg = _('public url %s is missing %s')
   671                     msg %= (publicurl, missing[0])
   671                     msg %= (publicurl, missing[0])