KiCad PCB EDA Suite
Loading...
Searching...
No Matches
command_mergetool.cpp File Reference
#include "command_mergetool.h"
#include <cli/exit_codes.h>
#include <diff_merge/diff_doc_kind.h>
#include <kiface_base.h>
#include <kiway.h>
#include <paths.h>
#include <string_utils.h>
#include <wx/crt.h>
#include <wx/filename.h>
#include <wx/utils.h>

Go to the source code of this file.

Macros

#define ARG_ANCESTOR   "ancestor"
 
#define ARG_OURS   "ours"
 
#define ARG_THEIRS   "theirs"
 
#define ARG_OUTPUT_F   "--output"
 

Functions

static int translateExitCode (int aKicadExit)
 Map kicad-side exit codes to the Phase 8 mergetool contract documented in the header.
 
static bool supportsMergetoolKind (KICAD_DIFF::DOC_KIND aKind)
 

Macro Definition Documentation

◆ ARG_ANCESTOR

#define ARG_ANCESTOR   "ancestor"

Definition at line 38 of file command_mergetool.cpp.

◆ ARG_OURS

#define ARG_OURS   "ours"

Definition at line 39 of file command_mergetool.cpp.

◆ ARG_OUTPUT_F

#define ARG_OUTPUT_F   "--output"

Definition at line 41 of file command_mergetool.cpp.

◆ ARG_THEIRS

#define ARG_THEIRS   "theirs"

Definition at line 40 of file command_mergetool.cpp.

Function Documentation

◆ supportsMergetoolKind()

static bool supportsMergetoolKind ( KICAD_DIFF::DOC_KIND aKind)
static

◆ translateExitCode()

static int translateExitCode ( int aKicadExit)
static

Map kicad-side exit codes to the Phase 8 mergetool contract documented in the header.

Anything not explicitly remapped passes through so the user can still diagnose unexpected codes.

Definition at line 47 of file command_mergetool.cpp.

References CLI::EXIT_CODES::ERR_INVALID_INPUT_FILE, CLI::EXIT_CODES::ERR_INVALID_OUTPUT_CONFLICT, CLI::EXIT_CODES::ERR_RC_VIOLATIONS, and CLI::EXIT_CODES::SUCCESS.

Referenced by CLI::MERGETOOL_COMMAND::doPerform().