Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
testing.tools.githelper.GitHelper Class Reference
Collaboration diagram for testing.tools.githelper.GitHelper:

Public Member Functions

 __init__ (self)
 Checkout (self, branch)
 FetchOriginMaster (self)
 StashPush (self)
 StashPopAll (self)
 GetCurrentBranchName (self)
 GetCurrentBranchHash (self)
 IsCurrentBranchClean (self)
 BranchExists (self, branch_name)
 CloneLocal (self, source_repo, new_repo)

Public Attributes

int stashed = 0

Detailed Description

Issues git commands. Stateful.

Definition at line 11 of file githelper.py.

Constructor & Destructor Documentation

◆ __init__()

testing.tools.githelper.GitHelper.__init__ ( self)

Definition at line 14 of file githelper.py.

Member Function Documentation

◆ BranchExists()

testing.tools.githelper.GitHelper.BranchExists ( self,
branch_name )
Return whether a branch with the given name exists.

Definition at line 56 of file githelper.py.

◆ Checkout()

testing.tools.githelper.GitHelper.Checkout ( self,
branch )
Checks out a branch.

Definition at line 17 of file githelper.py.

◆ CloneLocal()

testing.tools.githelper.GitHelper.CloneLocal ( self,
source_repo,
new_repo )

Definition at line 62 of file githelper.py.

◆ FetchOriginMaster()

testing.tools.githelper.GitHelper.FetchOriginMaster ( self)
Fetches new changes on origin/main.

Definition at line 21 of file githelper.py.

◆ GetCurrentBranchHash()

testing.tools.githelper.GitHelper.GetCurrentBranchHash ( self)

Definition at line 47 of file githelper.py.

◆ GetCurrentBranchName()

testing.tools.githelper.GitHelper.GetCurrentBranchName ( self)
Returns a string with the current branch name.

Definition at line 42 of file githelper.py.

◆ IsCurrentBranchClean()

testing.tools.githelper.GitHelper.IsCurrentBranchClean ( self)

Definition at line 51 of file githelper.py.

◆ StashPopAll()

testing.tools.githelper.GitHelper.StashPopAll ( self)
Pops as many changes as this instance stashed.

Definition at line 36 of file githelper.py.

References StashedContainer.stashed, and stashed.

◆ StashPush()

testing.tools.githelper.GitHelper.StashPush ( self)
Stashes uncommitted changes.

Definition at line 26 of file githelper.py.

References StashedContainer.stashed, and stashed.

Member Data Documentation

◆ stashed

int testing.tools.githelper.GitHelper.stashed = 0

Definition at line 15 of file githelper.py.

Referenced by StashPopAll(), and StashPush().


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