KiCad PCB EDA Suite
Loading...
Searching...
No Matches
KIGIT_COMMON Class Reference

#include <kicad_git_common.h>

Inheritance diagram for KIGIT_COMMON:
KIGIT_ERRORS GIT_CLONE_HANDLER GIT_COMMIT_HANDLER GIT_PULL_HANDLER GIT_PUSH_HANDLER

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
 

Detailed Description

Definition at line 34 of file kicad_git_common.h.

Member Enumeration Documentation

◆ GIT_CONN_TYPE

enum class KIGIT_COMMON::GIT_CONN_TYPE
strong
Enumerator
GIT_CONN_HTTPS 
GIT_CONN_SSH 
GIT_CONN_LOCAL 
GIT_CONN_LAST 

Definition at line 82 of file kicad_git_common.h.

◆ GIT_STATUS

enum class KIGIT_COMMON::GIT_STATUS
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.

Constructor & Destructor Documentation

◆ KIGIT_COMMON()

KIGIT_COMMON::KIGIT_COMMON ( git_repository *  aRepo)

Definition at line 31 of file kicad_git_common.cpp.

◆ ~KIGIT_COMMON()

KIGIT_COMMON::~KIGIT_COMMON ( )

Definition at line 35 of file kicad_git_common.cpp.

Member Function Documentation

◆ AddErrorString() [1/2]

void KIGIT_ERRORS::AddErrorString ( const std::string  aErrorString)
inlineinherited

Definition at line 66 of file kicad_git_errors.h.

References KIGIT_ERRORS::m_errorStrings.

◆ AddErrorString() [2/2]

◆ ClearErrorStrings()

void KIGIT_ERRORS::ClearErrorStrings ( )
inlineinherited

Definition at line 71 of file kicad_git_errors.h.

References KIGIT_ERRORS::m_errorStrings.

◆ GetBranchNames()

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().

◆ GetConnType()

◆ GetCurrentBranchName()

wxString KIGIT_COMMON::GetCurrentBranchName ( ) const

Definition at line 43 of file kicad_git_common.cpp.

References m_repo.

◆ GetDifferentFiles()

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.

References delta, and m_repo.

Referenced by PROJECT_TREE_PANE::updateGitStatusIcons().

◆ GetErrorString()

wxString KIGIT_ERRORS::GetErrorString ( )
inlineinherited

◆ GetErrorStrings()

const std::vector< wxString > & KIGIT_ERRORS::GetErrorStrings ( ) const
inlineinherited

Definition at line 38 of file kicad_git_errors.h.

References KIGIT_ERRORS::m_errorStrings.

◆ GetPassword()

wxString KIGIT_COMMON::GetPassword ( ) const
inline

◆ GetProjectDirs()

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

Returns
std::vector<wxString> of project files

Definition at line 128 of file kicad_git_common.cpp.

References m_repo.

Referenced by KICAD_MANAGER_CONTROL::NewFromRepository().

◆ GetRepo()

git_repository * KIGIT_COMMON::GetRepo ( ) const

Definition at line 38 of file kicad_git_common.cpp.

References m_repo.

◆ GetSSHKey()

wxString KIGIT_COMMON::GetSSHKey ( ) const
inline

◆ GetUsername()

wxString KIGIT_COMMON::GetUsername ( ) const
inline

◆ HasLocalCommits()

bool KIGIT_COMMON::HasLocalCommits ( ) const

Definition at line 311 of file kicad_git_common.cpp.

References m_repo.

Referenced by PROJECT_TREE_PANE::onRight().

◆ HasPushAndPullRemote()

bool KIGIT_COMMON::HasPushAndPullRemote ( ) const

Definition at line 360 of file kicad_git_common.cpp.

References m_repo.

Referenced by PROJECT_TREE_PANE::onRight().

◆ PeekErrorString()

const wxString & KIGIT_ERRORS::PeekErrorString ( ) const
inlineinherited

Definition at line 43 of file kicad_git_errors.h.

References _, and KIGIT_ERRORS::m_errorStrings.

◆ SetConnType() [1/2]

◆ SetConnType() [2/2]

void KIGIT_COMMON::SetConnType ( unsigned  aConnType)
inline

Definition at line 100 of file kicad_git_common.h.

References GIT_CONN_LAST, and m_connType.

◆ SetPassword()

◆ SetRepo()

void KIGIT_COMMON::SetRepo ( git_repository *  aRepo)
inline

Definition at line 43 of file kicad_git_common.h.

References m_repo.

◆ SetSSHKey()

◆ SetUsername()

◆ TestedTypes()

unsigned & KIGIT_COMMON::TestedTypes ( )
inline

Definition at line 109 of file kicad_git_common.h.

References m_testedTypes.

Referenced by credentials_cb().

◆ UpdateProgress()

virtual void KIGIT_COMMON::UpdateProgress ( int  aCurrent,
int  aTotal,
const wxString &  aMessage 
)
inlinevirtual

Member Data Documentation

◆ m_connType

GIT_CONN_TYPE KIGIT_COMMON::m_connType
protected

Definition at line 120 of file kicad_git_common.h.

Referenced by GetConnType(), and SetConnType().

◆ m_errorStrings

std::vector<wxString> KIGIT_ERRORS::m_errorStrings
privateinherited

◆ m_password

wxString KIGIT_COMMON::m_password
protected

Definition at line 122 of file kicad_git_common.h.

Referenced by GetPassword(), and SetPassword().

◆ m_repo

◆ m_sshKey

wxString KIGIT_COMMON::m_sshKey
protected

Definition at line 123 of file kicad_git_common.h.

Referenced by GetSSHKey(), and SetSSHKey().

◆ m_testedTypes

unsigned KIGIT_COMMON::m_testedTypes
protected

Definition at line 125 of file kicad_git_common.h.

Referenced by GIT_CLONE_HANDLER::PerformClone(), and TestedTypes().

◆ m_username

wxString KIGIT_COMMON::m_username
protected

Definition at line 121 of file kicad_git_common.h.

Referenced by GetUsername(), and SetUsername().


The documentation for this class was generated from the following files: