Patchwork [3,of,4] debugextensions: unindent nested if

login
register
mail settings
Submitter Yuya Nishihara
Date Aug. 4, 2016, 4:13 p.m.
Message ID <224606acd9ce2da7d1b1.1470327199@mimosa>
Download mbox | patch
Permalink /patch/16089/
State Accepted
Headers show

Comments

Yuya Nishihara - Aug. 4, 2016, 4:13 p.m.
# HG changeset patch
# User Yuya Nishihara <yuya@tcha.org>
# Date 1468156054 -32400
#      Sun Jul 10 22:07:34 2016 +0900
# Node ID 224606acd9ce2da7d1b1bf25c88bafabe5e373c0
# Parent  fb0ca5876b523dc93d5cb9990a5b22a846b43cc8
debugextensions: unindent nested if

Patch

diff --git a/mercurial/commands.py b/mercurial/commands.py
--- a/mercurial/commands.py
+++ b/mercurial/commands.py
@@ -2413,12 +2413,11 @@  def debugextensions(ui, **opts):
             fm.write('name', '%s', extname)
             if not exttestedwith:
                 fm.plain(_(' (untested!)\n'))
+            elif exttestedwith == ['internal'] or hgver in exttestedwith:
+                fm.plain('\n')
             else:
-                if exttestedwith == ['internal'] or hgver in exttestedwith:
-                    fm.plain('\n')
-                else:
-                    lasttestedversion = exttestedwith[-1]
-                    fm.plain(' (%s!)\n' % lasttestedversion)
+                lasttestedversion = exttestedwith[-1]
+                fm.plain(' (%s!)\n' % lasttestedversion)
 
         fm.condwrite(ui.verbose and extsource, 'source',
                  _('  location: %s\n'), extsource or "")