hgext/mq.py
changeset 11302 e1dde7363601
parent 11273 d1908cb95a82
child 11303 a1aad8333864
child 11310 ac873ecfc3c2
equal deleted inserted replaced
11301:3d0591a66118 11302:e1dde7363601
  2143 
  2143 
  2144       hg qguard other.patch -- +2.6.17 -stable
  2144       hg qguard other.patch -- +2.6.17 -stable
  2145     '''
  2145     '''
  2146     def status(idx):
  2146     def status(idx):
  2147         guards = q.series_guards[idx] or ['unguarded']
  2147         guards = q.series_guards[idx] or ['unguarded']
  2148         ui.write('%s: ' % ui.label(q.series[idx], 'qguard.patch'))
  2148         out = ['%s: ' % ui.label(q.series[idx], 'qguard.patch')]
  2149         for i, guard in enumerate(guards):
  2149         for i, guard in enumerate(guards):
  2150             if guard.startswith('+'):
  2150             if guard.startswith('+'):
  2151                 ui.write(guard, label='qguard.positive')
  2151                 out.append(ui.label(guard, 'qguard.positive'))
  2152             elif guard.startswith('-'):
  2152             elif guard.startswith('-'):
  2153                 ui.write(guard, label='qguard.negative')
  2153                 out.append(ui.label(guard, 'qguard.negative'))
  2154             else:
  2154             else:
  2155                 ui.write(guard, label='qguard.unguarded')
  2155                 out.append(ui.label(guard, 'qguard.unguarded'))
  2156             if i != len(guards) - 1:
  2156             if i != len(guards) - 1:
  2157                 ui.write(' ')
  2157                 out.append(ui.label(' ', 'ui.plain'))
  2158         ui.write('\n')
  2158         ui.write(''.join(out) + '\n', label='ui.labeled')
  2159     q = repo.mq
  2159     q = repo.mq
  2160     patch = None
  2160     patch = None
  2161     args = list(args)
  2161     args = list(args)
  2162     if opts['list']:
  2162     if opts['list']:
  2163         if args or opts['none']:
  2163         if args or opts['none']:
  2797     if a:
  2797     if a:
  2798         m.append(ui.label(_("%d applied"), 'qseries.applied') % a)
  2798         m.append(ui.label(_("%d applied"), 'qseries.applied') % a)
  2799     if u:
  2799     if u:
  2800         m.append(ui.label(_("%d unapplied"), 'qseries.unapplied') % u)
  2800         m.append(ui.label(_("%d unapplied"), 'qseries.unapplied') % u)
  2801     if m:
  2801     if m:
  2802         ui.write("mq:     %s\n" % ', '.join(m))
  2802         ui.write("mq:     ")
       
  2803         ui.write(', '.join(m) + '\n', label='ui.labeled')
  2803     else:
  2804     else:
  2804         ui.note(_("mq:     (empty queue)\n"))
  2805         ui.note(_("mq:     (empty queue)\n"))
  2805     return r
  2806     return r
  2806 
  2807 
  2807 def uisetup(ui):
  2808 def uisetup(ui):