Show More
@@ -709,10 +709,24 b' class savedcmd(object):' | |||||
709 | ) |
|
709 | ) | |
710 |
|
710 | |||
711 |
|
711 | |||
712 | def uisetup(ui): |
|
712 | def _gettooldetails(ui, cmd, path): | |
713 | for cmd, path in ui.configitems(b'extdiff'): |
|
713 | """ | |
714 | if cmd.startswith(b'opts.') or cmd.startswith(b'gui.'): |
|
714 | returns following things for a | |
715 | continue |
|
715 | ``` | |
|
716 | [extdiff] | |||
|
717 | <cmd> = <path> | |||
|
718 | ``` | |||
|
719 | entry: | |||
|
720 | ||||
|
721 | cmd: command/tool name | |||
|
722 | path: path to the tool | |||
|
723 | cmdline: the command which should be run | |||
|
724 | isgui: whether the tool uses GUI or not | |||
|
725 | ||||
|
726 | Reads all external tools related configs, whether it be extdiff section, | |||
|
727 | diff-tools or merge-tools section, or its specified in an old format or | |||
|
728 | the latest format. | |||
|
729 | """ | |||
716 |
|
|
730 | path = util.expandpath(path) | |
717 |
|
|
731 | if cmd.startswith(b'cmd.'): | |
718 |
|
|
732 | cmd = cmd[4:] | |
@@ -748,6 +762,14 b' def uisetup(ui):' | |||||
748 |
|
|
762 | if isgui is None: | |
749 |
|
|
763 | isgui = ui.configbool(section, cmd + b'.gui') or False | |
750 |
|
|
764 | break | |
|
765 | return cmd, path, cmdline, isgui | |||
|
766 | ||||
|
767 | ||||
|
768 | def uisetup(ui): | |||
|
769 | for cmd, path in ui.configitems(b'extdiff'): | |||
|
770 | if cmd.startswith(b'opts.') or cmd.startswith(b'gui.'): | |||
|
771 | continue | |||
|
772 | cmd, path, cmdline, isgui = _gettooldetails(ui, cmd, path) | |||
751 | command( |
|
773 | command( | |
752 | cmd, |
|
774 | cmd, | |
753 | extdiffopts[:], |
|
775 | extdiffopts[:], |
General Comments 0
You need to be logged in to leave comments.
Login now