KiCad PCB EDA Suite
|
#include <kicad_git_common.h>
Public Types | |
enum class | GIT_STATUS { GIT_STATUS_UNTRACKED , GIT_STATUS_CURRENT , GIT_STATUS_MODIFIED , GIT_STATUS_ADDED , GIT_STATUS_DELETED , GIT_STATUS_BEHIND , GIT_STATUS_AHEAD , GIT_STATUS_CONFLICTED , GIT_STATUS_LAST } |
enum class | GIT_CONN_TYPE { GIT_CONN_HTTPS = 0 , GIT_CONN_SSH , GIT_CONN_LOCAL , GIT_CONN_LAST } |
Public Member Functions | |
KIGIT_COMMON (git_repository *aRepo) | |
~KIGIT_COMMON () | |
git_repository * | GetRepo () const |
void | SetRepo (git_repository *aRepo) |
wxString | GetCurrentBranchName () const |
std::vector< wxString > | GetBranchNames () const |
virtual void | UpdateProgress (int aCurrent, int aTotal, const wxString &aMessage) |
std::vector< wxString > | GetProjectDirs () |
Return a vector of project files in the repository. | |
std::pair< std::set< wxString >, std::set< wxString > > | GetDifferentFiles () const |
Return a pair of sets of files that differ locally from the remote repository The first set is files that have been committed locally but not pushed The second set is files that have been committed remotely but not pulled. | |
wxString | GetUsername () const |
wxString | GetPassword () const |
wxString | GetSSHKey () const |
GIT_CONN_TYPE | GetConnType () const |
void | SetUsername (const wxString &aUsername) |
void | SetPassword (const wxString &aPassword) |
void | SetSSHKey (const wxString &aSSHKey) |
void | SetConnType (GIT_CONN_TYPE aConnType) |
void | SetConnType (unsigned aConnType) |
unsigned & | TestedTypes () |
bool | HasLocalCommits () const |
bool | HasPushAndPullRemote () const |
const std::vector< wxString > & | GetErrorStrings () const |
const wxString & | PeekErrorString () const |
wxString | GetErrorString () |
void | AddErrorString (const wxString aErrorString) |
void | AddErrorString (const std::string aErrorString) |
void | ClearErrorStrings () |
Protected Attributes | |
git_repository * | m_repo |
GIT_CONN_TYPE | m_connType |
wxString | m_username |
wxString | m_password |
wxString | m_sshKey |
unsigned | m_testedTypes |
Private Attributes | |
std::vector< wxString > | m_errorStrings |
Definition at line 34 of file kicad_git_common.h.
|
strong |
Enumerator | |
---|---|
GIT_CONN_HTTPS | |
GIT_CONN_SSH | |
GIT_CONN_LOCAL | |
GIT_CONN_LAST |
Definition at line 82 of file kicad_git_common.h.
|
strong |
Enumerator | |
---|---|
GIT_STATUS_UNTRACKED | |
GIT_STATUS_CURRENT | |
GIT_STATUS_MODIFIED | |
GIT_STATUS_ADDED | |
GIT_STATUS_DELETED | |
GIT_STATUS_BEHIND | |
GIT_STATUS_AHEAD | |
GIT_STATUS_CONFLICTED | |
GIT_STATUS_LAST |
Definition at line 69 of file kicad_git_common.h.
KIGIT_COMMON::KIGIT_COMMON | ( | git_repository * | aRepo | ) |
Definition at line 31 of file kicad_git_common.cpp.
KIGIT_COMMON::~KIGIT_COMMON | ( | ) |
Definition at line 35 of file kicad_git_common.cpp.
|
inlineinherited |
Definition at line 66 of file kicad_git_errors.h.
References KIGIT_ERRORS::m_errorStrings.
|
inlineinherited |
Definition at line 61 of file kicad_git_errors.h.
References KIGIT_ERRORS::m_errorStrings.
Referenced by GIT_PULL_HANDLER::handleFastForward(), GIT_PULL_HANDLER::handleMerge(), GIT_CLONE_HANDLER::PerformClone(), GIT_PULL_HANDLER::PerformFetch(), GIT_PULL_HANDLER::PerformPull(), and GIT_PUSH_HANDLER::PerformPush().
|
inlineinherited |
Definition at line 71 of file kicad_git_errors.h.
References KIGIT_ERRORS::m_errorStrings.
std::vector< wxString > KIGIT_COMMON::GetBranchNames | ( | ) | const |
Definition at line 75 of file kicad_git_common.cpp.
References m_repo.
Referenced by PROJECT_TREE_PANE::onRight().
|
inline |
Definition at line 93 of file kicad_git_common.h.
References m_connType.
Referenced by credentials_cb(), PROJECT_TREE_PANE::onGitInitializeProject(), PROJECT_TREE_PANE::onGitPullProject(), and PROJECT_TREE_PANE::onGitPushProject().
wxString KIGIT_COMMON::GetCurrentBranchName | ( | ) | const |
Definition at line 43 of file kicad_git_common.cpp.
References m_repo.
std::pair< std::set< wxString >, std::set< wxString > > KIGIT_COMMON::GetDifferentFiles | ( | ) | const |
Return a pair of sets of files that differ locally from the remote repository The first set is files that have been committed locally but not pushed The second set is files that have been committed remotely but not pulled.
Definition at line 194 of file kicad_git_common.cpp.
Referenced by PROJECT_TREE_PANE::updateGitStatusIcons().
|
inlineinherited |
Definition at line 51 of file kicad_git_errors.h.
References _, and KIGIT_ERRORS::m_errorStrings.
Referenced by KICAD_MANAGER_CONTROL::NewFromRepository(), PROJECT_TREE_PANE::onGitPullProject(), and PROJECT_TREE_PANE::onGitPushProject().
|
inlineinherited |
Definition at line 38 of file kicad_git_errors.h.
References KIGIT_ERRORS::m_errorStrings.
|
inline |
Definition at line 91 of file kicad_git_common.h.
References m_password.
Referenced by credentials_cb(), PROJECT_TREE_PANE::onGitInitializeProject(), PROJECT_TREE_PANE::onGitPullProject(), and PROJECT_TREE_PANE::onGitPushProject().
std::vector< wxString > KIGIT_COMMON::GetProjectDirs | ( | ) |
Return a vector of project files in the repository.
Sorted by the depth of the project file in the directory tree
Definition at line 128 of file kicad_git_common.cpp.
References m_repo.
Referenced by KICAD_MANAGER_CONTROL::NewFromRepository().
git_repository * KIGIT_COMMON::GetRepo | ( | ) | const |
Definition at line 38 of file kicad_git_common.cpp.
References m_repo.
|
inline |
Definition at line 92 of file kicad_git_common.h.
References m_sshKey.
Referenced by credentials_cb(), PROJECT_TREE_PANE::onGitInitializeProject(), PROJECT_TREE_PANE::onGitPullProject(), and PROJECT_TREE_PANE::onGitPushProject().
|
inline |
Definition at line 90 of file kicad_git_common.h.
References m_username.
Referenced by credentials_cb(), PROJECT_TREE_PANE::onGitInitializeProject(), PROJECT_TREE_PANE::onGitPullProject(), and PROJECT_TREE_PANE::onGitPushProject().
bool KIGIT_COMMON::HasLocalCommits | ( | ) | const |
Definition at line 312 of file kicad_git_common.cpp.
References m_repo.
Referenced by PROJECT_TREE_PANE::onRight().
bool KIGIT_COMMON::HasPushAndPullRemote | ( | ) | const |
Definition at line 361 of file kicad_git_common.cpp.
References m_repo.
Referenced by PROJECT_TREE_PANE::onRight().
|
inlineinherited |
Definition at line 43 of file kicad_git_errors.h.
References _, and KIGIT_ERRORS::m_errorStrings.
|
inline |
Definition at line 99 of file kicad_git_common.h.
References m_connType.
Referenced by KICAD_MANAGER_CONTROL::NewFromRepository(), PROJECT_TREE_PANE::onGitInitializeProject(), PROJECT_TREE_PANE::onGitPullProject(), PROJECT_TREE_PANE::onGitPushProject(), and PROJECT_TREE_PANE::ReCreateTreePrj().
|
inline |
Definition at line 100 of file kicad_git_common.h.
References GIT_CONN_LAST, and m_connType.
|
inline |
Definition at line 96 of file kicad_git_common.h.
References m_password.
Referenced by KICAD_MANAGER_CONTROL::NewFromRepository(), PROJECT_TREE_PANE::onGitInitializeProject(), PROJECT_TREE_PANE::onGitPullProject(), PROJECT_TREE_PANE::onGitPushProject(), and PROJECT_TREE_PANE::ReCreateTreePrj().
|
inline |
Definition at line 43 of file kicad_git_common.h.
References m_repo.
|
inline |
Definition at line 97 of file kicad_git_common.h.
References m_sshKey.
Referenced by KICAD_MANAGER_CONTROL::NewFromRepository(), PROJECT_TREE_PANE::onGitInitializeProject(), PROJECT_TREE_PANE::onGitPullProject(), PROJECT_TREE_PANE::onGitPushProject(), and PROJECT_TREE_PANE::ReCreateTreePrj().
|
inline |
Definition at line 95 of file kicad_git_common.h.
References m_username.
Referenced by KICAD_MANAGER_CONTROL::NewFromRepository(), PROJECT_TREE_PANE::onGitInitializeProject(), PROJECT_TREE_PANE::onGitPullProject(), PROJECT_TREE_PANE::onGitPushProject(), and PROJECT_TREE_PANE::ReCreateTreePrj().
|
inline |
Definition at line 109 of file kicad_git_common.h.
References m_testedTypes.
Referenced by credentials_cb().
|
inlinevirtual |
Reimplemented in GIT_CLONE_HANDLER, GIT_PULL_HANDLER, and GIT_PUSH_HANDLER.
Definition at line 52 of file kicad_git_common.h.
Referenced by clone_progress_cb(), progress_cb(), push_transfer_progress_cb(), push_update_reference_cb(), transfer_progress_cb(), and update_cb().
|
protected |
Definition at line 120 of file kicad_git_common.h.
Referenced by GetConnType(), and SetConnType().
|
privateinherited |
Definition at line 78 of file kicad_git_errors.h.
Referenced by KIGIT_ERRORS::AddErrorString(), KIGIT_ERRORS::ClearErrorStrings(), KIGIT_ERRORS::GetErrorString(), KIGIT_ERRORS::GetErrorStrings(), and KIGIT_ERRORS::PeekErrorString().
|
protected |
Definition at line 122 of file kicad_git_common.h.
Referenced by GetPassword(), and SetPassword().
|
protected |
Definition at line 118 of file kicad_git_common.h.
Referenced by GetBranchNames(), GetCurrentBranchName(), GetDifferentFiles(), GetProjectDirs(), GetRepo(), GIT_PULL_HANDLER::handleFastForward(), GIT_PULL_HANDLER::handleMerge(), HasLocalCommits(), HasPushAndPullRemote(), GIT_CLONE_HANDLER::PerformClone(), GIT_PULL_HANDLER::PerformFetch(), GIT_PULL_HANDLER::PerformPull(), GIT_PUSH_HANDLER::PerformPush(), SetRepo(), and GIT_CLONE_HANDLER::~GIT_CLONE_HANDLER().
|
protected |
Definition at line 123 of file kicad_git_common.h.
Referenced by GetSSHKey(), and SetSSHKey().
|
protected |
Definition at line 125 of file kicad_git_common.h.
Referenced by GIT_CLONE_HANDLER::PerformClone(), and TestedTypes().
|
protected |
Definition at line 121 of file kicad_git_common.h.
Referenced by GetUsername(), and SetUsername().