# HG changeset patch # User Pulkit Goyal <7895pulkit@gmail.com> # Date 2020-09-02 13:47:31 # Node ID a28da102fd3662d22f110943d1a1c08ed2bc527c # Parent 543e446204c6ec20a5b0af4b7ff7729ffe60af4c 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. diff --git a/hgext/extdiff.py b/hgext/extdiff.py --- a/hgext/extdiff.py +++ b/hgext/extdiff.py @@ -711,6 +711,8 @@ class savedcmd(object): 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 @@ def uisetup(ui): 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"