Merge backout
authorSteve Borho <steve@borho.org>
Tue, 08 Jun 2010 15:52:56 -0500
changeset 11311 fcd06ecd4cb7
parent 11309 ef7636efeb01 (current diff)
parent 11310 ac873ecfc3c2 (diff)
child 11312 3f1409082720
child 11313 0bb14798cd07
Merge backout
hgext/mq.py
mercurial/commands.py
mercurial/ui.py
--- a/hgext/churn.py	Tue Jun 08 21:09:41 2010 +0200
+++ b/hgext/churn.py	Tue Jun 08 15:52:56 2010 -0500
@@ -150,10 +150,8 @@
     if opts.get('diffstat'):
         width -= 15
         def format(name, (added, removed)):
-            return "%s %15s %s%s\n" % (ui.label(pad(name, maxname),
-                                                'ui.plain'),
-                                       ui.label('+%d/-%d' % (added, removed),
-                                                'ui.plain'),
+            return "%s %15s %s%s\n" % (pad(name, maxname),
+                                       '+%d/-%d' % (added, removed),
                                        ui.label('+' * charnum(added),
                                                 'diffstat.inserted'),
                                        ui.label('-' * charnum(removed),
@@ -161,14 +159,14 @@
     else:
         width -= 6
         def format(name, count):
-            return ui.label("%s %6d %s\n" % (pad(name, maxname), sum(count),
-                            '*' * charnum(sum(count))), 'ui.plain')
+            return "%s %6d %s\n" % (pad(name, maxname), sum(count),
+                                    '*' * charnum(sum(count)))
 
     def charnum(count):
         return int(round(count * width / maxcount))
 
     for name, count in rate:
-        ui.write(format(name, count), label='ui.labeled')
+        ui.write(format(name, count))
 
 
 cmdtable = {
--- a/hgext/color.py	Tue Jun 08 21:09:41 2010 +0200
+++ b/hgext/color.py	Tue Jun 08 15:52:56 2010 -0500
@@ -108,9 +108,7 @@
            'status.ignored': 'black bold',
            'status.modified': 'blue bold',
            'status.removed': 'red bold',
-           'status.unknown': 'magenta bold underline',
-           'ui.labeled': 'none',
-           'ui.plain': 'none'}
+           'status.unknown': 'magenta bold underline'}
 
 
 def render_effects(text, effects):
@@ -144,8 +142,6 @@
 
 _buffers = None
 def style(msg, label):
-    if label in ('ui.plain', 'ui.labeled'):
-        return msg
     effects = []
     for l in label.split():
         s = _styles.get(l, '')
--- a/hgext/mq.py	Tue Jun 08 21:09:41 2010 +0200
+++ b/hgext/mq.py	Tue Jun 08 15:52:56 2010 -0500
@@ -2145,17 +2145,17 @@
     '''
     def status(idx):
         guards = q.series_guards[idx] or ['unguarded']
-        out = ['%s: ' % ui.label(q.series[idx], 'qguard.patch')]
+        ui.write('%s: ' % ui.label(q.series[idx], 'qguard.patch'))
         for i, guard in enumerate(guards):
             if guard.startswith('+'):
-                out.append(ui.label(guard, 'qguard.positive'))
+                ui.write(guard, label='qguard.positive')
             elif guard.startswith('-'):
-                out.append(ui.label(guard, 'qguard.negative'))
+                ui.write(guard, label='qguard.negative')
             else:
-                out.append(ui.label(guard, 'qguard.unguarded'))
+                ui.write(guard, label='qguard.unguarded')
             if i != len(guards) - 1:
-                out.append(ui.label(' ', 'ui.plain'))
-        ui.write(''.join(out) + '\n', label='ui.labeled')
+                ui.write(' ')
+        ui.write('\n')
     q = repo.mq
     patch = None
     args = list(args)
@@ -2800,8 +2800,7 @@
     if u:
         m.append(ui.label(_("%d unapplied"), 'qseries.unapplied') % u)
     if m:
-        ui.write("mq:     ")
-        ui.write(', '.join(m) + '\n', label='ui.labeled')
+        ui.write("mq:     %s\n" % ', '.join(m))
     else:
         ui.note(_("mq:     (empty queue)\n"))
     return r
--- a/mercurial/commands.py	Tue Jun 08 21:09:41 2010 +0200
+++ b/mercurial/commands.py	Tue Jun 08 15:52:56 2010 -0500
@@ -3280,22 +3280,22 @@
     cleanworkdir = False
 
     if len(parents) > 1:
-        t += ui.label(_(' (merge)'), 'ui.plain')
+        t += _(' (merge)')
     elif branch != parents[0].branch():
-        t += ui.label(_(' (new branch)'), 'ui.plain')
+        t += _(' (new branch)')
     elif (parents[0].extra().get('close') and
           pnode in repo.branchheads(branch, closed=True)):
-        t += ui.label(_(' (head closed)'), 'ui.plain')
+        t += _(' (head closed)')
     elif (not st[0] and not st[1] and not st[2] and not st[7]):
-        t += ui.label(_(' (clean)'), 'ui.plain')
+        t += _(' (clean)')
         cleanworkdir = True
     elif pnode not in bheads:
-        t += ui.label(_(' (new branch head)'), 'ui.plain')
+        t += _(' (new branch head)')
 
     if cleanworkdir:
-        ui.status(_('commit: %s\n') % t.strip(), label='ui.labeled')
+        ui.status(_('commit: %s\n') % t.strip())
     else:
-        ui.write(_('commit: %s\n') % t.strip(), label='ui.labeled')
+        ui.write(_('commit: %s\n') % t.strip())
 
     # all ancestors of branch heads - all ancestors of parent = new csets
     new = [0] * len(repo)
--- a/mercurial/ui.py	Tue Jun 08 21:09:41 2010 +0200
+++ b/mercurial/ui.py	Tue Jun 08 15:52:56 2010 -0500
@@ -546,9 +546,5 @@
 
         ui.write(s, 'label') is equivalent to
         ui.write(ui.label(s, 'label')).
-
-        Callers of ui.label() should pass labeled text back to
-        ui.write() with a label of 'ui.labeled' so implementations know
-        that the text has already been escaped and marked up.
         '''
         return msg