KiCad PCB EDA Suite
|
#include <git_commit_handler.h>
Public Types | |
enum class | CommitResult { Success , Error , Cancelled } |
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 | |
GIT_COMMIT_HANDLER (git_repository *aRepo) | |
virtual | ~GIT_COMMIT_HANDLER () |
CommitResult | PerformCommit (const std::vector< std::string > &aFilesToCommit) |
std::string | GetErrorString () const |
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 |
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 |
void | UpdateCurrentBranchInfo () |
wxString | GetRemotename () const |
void | ResetNextKey () |
wxString | GetNextPublicKey () |
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_remote |
wxString | m_hostname |
wxString | m_username |
wxString | m_password |
unsigned | m_testedTypes |
Private Member Functions | |
void | AddErrorString (const std::string &aErrorString) |
void | updatePublicKeys () |
void | updateConnectionType () |
Private Attributes | |
std::string | m_errorString |
std::vector< wxString > | m_publicKeys |
int | m_nextPublicKey |
std::vector< wxString > | m_errorStrings |
Definition at line 35 of file git_commit_handler.h.
|
strong |
Enumerator | |
---|---|
Success | |
Error | |
Cancelled |
Definition at line 41 of file git_commit_handler.h.
|
stronginherited |
Enumerator | |
---|---|
GIT_CONN_HTTPS | |
GIT_CONN_SSH | |
GIT_CONN_LOCAL | |
GIT_CONN_LAST |
Definition at line 82 of file kicad_git_common.h.
|
stronginherited |
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.
GIT_COMMIT_HANDLER::GIT_COMMIT_HANDLER | ( | git_repository * | aRepo | ) |
Definition at line 26 of file git_commit_handler.cpp.
|
virtual |
Definition at line 31 of file git_commit_handler.cpp.
|
private |
Definition at line 48 of file git_commit_handler.cpp.
References m_errorString.
|
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.
|
inherited |
Definition at line 81 of file kicad_git_common.cpp.
References KIGIT_COMMON::m_repo.
Referenced by PROJECT_TREE_PANE::onRight().
|
inlineinherited |
Definition at line 92 of file kicad_git_common.h.
References KIGIT_COMMON::m_connType.
Referenced by credentials_cb().
|
inherited |
Definition at line 49 of file kicad_git_common.cpp.
References KIGIT_COMMON::m_repo.
|
inherited |
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 200 of file kicad_git_common.cpp.
References delta, and KIGIT_COMMON::m_repo.
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().
std::string GIT_COMMIT_HANDLER::GetErrorString | ( | ) | const |
Definition at line 42 of file git_commit_handler.cpp.
References m_errorString.
|
inlineinherited |
Definition at line 38 of file kicad_git_errors.h.
References KIGIT_ERRORS::m_errorStrings.
|
inlineinherited |
Definition at line 123 of file kicad_git_common.h.
References KIGIT_COMMON::m_nextPublicKey, and KIGIT_COMMON::m_publicKeys.
Referenced by credentials_cb().
|
inlineinherited |
Definition at line 91 of file kicad_git_common.h.
References KIGIT_COMMON::m_password.
Referenced by credentials_cb().
|
inherited |
Return a vector of project files in the repository.
Sorted by the depth of the project file in the directory tree
Definition at line 134 of file kicad_git_common.cpp.
References KIGIT_COMMON::m_repo.
Referenced by KICAD_MANAGER_CONTROL::NewFromRepository().
|
inherited |
Definition at line 394 of file kicad_git_common.cpp.
References KIGIT_COMMON::m_repo.
Referenced by KIGIT_COMMON::UpdateCurrentBranchInfo().
|
inherited |
Definition at line 44 of file kicad_git_common.cpp.
References KIGIT_COMMON::m_repo.
|
inlineinherited |
Definition at line 90 of file kicad_git_common.h.
References KIGIT_COMMON::m_username.
Referenced by credentials_cb().
|
inherited |
Definition at line 318 of file kicad_git_common.cpp.
References KIGIT_COMMON::m_repo.
Referenced by PROJECT_TREE_PANE::onRight().
|
inherited |
Definition at line 367 of file kicad_git_common.cpp.
References KIGIT_COMMON::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.
GIT_COMMIT_HANDLER::CommitResult GIT_COMMIT_HANDLER::PerformCommit | ( | const std::vector< std::string > & | aFilesToCommit | ) |
Definition at line 36 of file git_commit_handler.cpp.
References Success.
|
inlineinherited |
Definition at line 121 of file kicad_git_common.h.
References KIGIT_COMMON::m_nextPublicKey.
Referenced by GIT_CLONE_HANDLER::PerformClone(), and GIT_PULL_HANDLER::PerformFetch().
|
inlineinherited |
Definition at line 98 of file kicad_git_common.h.
References KIGIT_COMMON::m_connType.
Referenced by KICAD_MANAGER_CONTROL::NewFromRepository(), and PROJECT_TREE_PANE::onGitInitializeProject().
|
inlineinherited |
Definition at line 99 of file kicad_git_common.h.
References KIGIT_COMMON::GIT_CONN_LAST, and KIGIT_COMMON::m_connType.
|
inlineinherited |
Definition at line 95 of file kicad_git_common.h.
References KIGIT_COMMON::m_password.
Referenced by KICAD_MANAGER_CONTROL::NewFromRepository(), and PROJECT_TREE_PANE::onGitInitializeProject().
|
inlineinherited |
Definition at line 43 of file kicad_git_common.h.
References KIGIT_COMMON::m_repo.
|
inherited |
Definition at line 421 of file kicad_git_common.cpp.
References KIGIT_COMMON::m_publicKeys.
Referenced by KICAD_MANAGER_CONTROL::NewFromRepository(), PROJECT_TREE_PANE::onGitInitializeProject(), PROJECT_TREE_PANE::ReCreateTreePrj(), and KIGIT_COMMON::updatePublicKeys().
|
inlineinherited |
Definition at line 94 of file kicad_git_common.h.
References KIGIT_COMMON::m_username.
Referenced by KICAD_MANAGER_CONTROL::NewFromRepository(), PROJECT_TREE_PANE::onGitInitializeProject(), and PROJECT_TREE_PANE::ReCreateTreePrj().
|
inlineinherited |
Definition at line 108 of file kicad_git_common.h.
References KIGIT_COMMON::m_testedTypes.
Referenced by credentials_cb().
|
privateinherited |
Definition at line 531 of file kicad_git_common.cpp.
References KIGIT_COMMON::GIT_CONN_HTTPS, KIGIT_COMMON::GIT_CONN_LOCAL, KIGIT_COMMON::GIT_CONN_SSH, KIGIT_COMMON::m_connType, KIGIT_COMMON::m_hostname, KIGIT_COMMON::m_password, KIGIT_COMMON::m_remote, and KIGIT_COMMON::m_username.
Referenced by KIGIT_COMMON::UpdateCurrentBranchInfo().
|
inherited |
Definition at line 506 of file kicad_git_common.cpp.
References KIGIT_COMMON::GetRemotename(), KIPLATFORM::SECRETS::GetSecret(), KIGIT_COMMON::m_password, KIGIT_COMMON::m_remote, KIGIT_COMMON::m_repo, KIGIT_COMMON::m_username, KIGIT_COMMON::updateConnectionType(), and KIGIT_COMMON::updatePublicKeys().
Referenced by PROJECT_TREE_PANE::ReCreateTreePrj().
|
inlinevirtualinherited |
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().
|
privateinherited |
Definition at line 432 of file kicad_git_common.cpp.
References KIGIT_COMMON::m_hostname, KIGIT_COMMON::m_publicKeys, and KIGIT_COMMON::SetSSHKey().
Referenced by KIGIT_COMMON::UpdateCurrentBranchInfo().
|
protectedinherited |
Definition at line 134 of file kicad_git_common.h.
Referenced by KIGIT_COMMON::GetConnType(), KIGIT_COMMON::SetConnType(), and KIGIT_COMMON::updateConnectionType().
|
private |
Definition at line 55 of file git_commit_handler.h.
Referenced by AddErrorString(), and GetErrorString().
|
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().
|
protectedinherited |
Definition at line 136 of file kicad_git_common.h.
Referenced by KIGIT_COMMON::updateConnectionType(), and KIGIT_COMMON::updatePublicKeys().
|
privateinherited |
Definition at line 147 of file kicad_git_common.h.
Referenced by KIGIT_COMMON::GetNextPublicKey(), and KIGIT_COMMON::ResetNextKey().
|
protectedinherited |
Definition at line 138 of file kicad_git_common.h.
Referenced by KIGIT_COMMON::GetPassword(), KIGIT_COMMON::SetPassword(), KIGIT_COMMON::updateConnectionType(), and KIGIT_COMMON::UpdateCurrentBranchInfo().
|
privateinherited |
Definition at line 146 of file kicad_git_common.h.
Referenced by KIGIT_COMMON::GetNextPublicKey(), KIGIT_COMMON::SetSSHKey(), and KIGIT_COMMON::updatePublicKeys().
|
protectedinherited |
Definition at line 135 of file kicad_git_common.h.
Referenced by KIGIT_COMMON::updateConnectionType(), and KIGIT_COMMON::UpdateCurrentBranchInfo().
|
protectedinherited |
Definition at line 132 of file kicad_git_common.h.
Referenced by KIGIT_COMMON::GetBranchNames(), KIGIT_COMMON::GetCurrentBranchName(), KIGIT_COMMON::GetDifferentFiles(), KIGIT_COMMON::GetProjectDirs(), KIGIT_COMMON::GetRemotename(), KIGIT_COMMON::GetRepo(), GIT_PULL_HANDLER::handleFastForward(), GIT_PULL_HANDLER::handleMerge(), KIGIT_COMMON::HasLocalCommits(), KIGIT_COMMON::HasPushAndPullRemote(), GIT_CLONE_HANDLER::PerformClone(), GIT_PULL_HANDLER::PerformFetch(), GIT_PULL_HANDLER::PerformPull(), GIT_PUSH_HANDLER::PerformPush(), KIGIT_COMMON::SetRepo(), KIGIT_COMMON::UpdateCurrentBranchInfo(), and GIT_CLONE_HANDLER::~GIT_CLONE_HANDLER().
|
protectedinherited |
Definition at line 140 of file kicad_git_common.h.
Referenced by GIT_CLONE_HANDLER::PerformClone(), GIT_PULL_HANDLER::PerformFetch(), and KIGIT_COMMON::TestedTypes().
|
protectedinherited |
Definition at line 137 of file kicad_git_common.h.
Referenced by KIGIT_COMMON::GetUsername(), KIGIT_COMMON::SetUsername(), KIGIT_COMMON::updateConnectionType(), and KIGIT_COMMON::UpdateCurrentBranchInfo().