extdiff: reorder an if-else conditional
authorPulkit Goyal <7895pulkit@gmail.com>
Wed, 02 Sep 2020 19:17:31 +0530
changeset 45409 a28da102fd36
parent 45408 543e446204c6
child 45410 2d08dcf8fd9e
extdiff: reorder an if-else conditional This brings continue part on top and will help in next patch where we will like to introduce utility functions for rest of the code.
hgext/extdiff.py
--- a/hgext/extdiff.py	Wed Sep 02 23:09:45 2020 +0530
+++ b/hgext/extdiff.py	Wed Sep 02 19:17:31 2020 +0530
@@ -711,6 +711,8 @@
 
 def uisetup(ui):
     for cmd, path in ui.configitems(b'extdiff'):
+        if cmd.startswith(b'opts.') or cmd.startswith(b'gui.'):
+            continue
         path = util.expandpath(path)
         if cmd.startswith(b'cmd.'):
             cmd = cmd[4:]
@@ -723,8 +725,6 @@
             if diffopts:
                 cmdline += b' ' + diffopts
             isgui = ui.configbool(b'extdiff', b'gui.' + cmd)
-        elif cmd.startswith(b'opts.') or cmd.startswith(b'gui.'):
-            continue
         else:
             if path:
                 # case "cmd = path opts"