--- a/src/eric7/Plugins/VcsPlugins/vcsGit/git.py Fri Dec 22 19:45:17 2023 +0100 +++ b/src/eric7/Plugins/VcsPlugins/vcsGit/git.py Sat Dec 23 15:40:23 2023 +0100 @@ -44,8 +44,11 @@ Constructor @param plugin reference to the plugin object - @param parent parent widget (QWidget) - @param name name of this object (string) + @type VcsGitPlugin + @param parent parent widget + @type QWidget + @param name name of this object + @type str """ VersionControl.__init__(self, parent, name) self.defaultOptions = { @@ -112,7 +115,8 @@ """ Public method to get a reference to the plugin object. - @return reference to the plugin object (VcsGitPlugin) + @return reference to the plugin object + @rtype VcsGitPlugin """ return self.__plugin @@ -165,8 +169,10 @@ """ Public method to initialize a command arguments list. - @param command command name (string) - @return list of command options (list of string) + @param command command name + @type str + @return list of command options + @rtype list of str """ args = [command] return args @@ -175,8 +181,8 @@ """ Public method used to test for the presence of the git executable. - @return flag indicating the existance (boolean) and an error message - (string) + @return flag indicating the existance and an error message + @rtype tuple of (bool, str) """ self.versionStr = "" errMsg = "" @@ -224,9 +230,12 @@ Git controlled project. Therefore we always return TRUE without doing anything. - @param vcsDir name of the VCS directory (string) - @param noDialog flag indicating quiet operations (boolean) - @return always TRUE + @param vcsDir name of the VCS directory + @type str + @param noDialog flag indicating quiet operations + @type bool + @return always True + @rtype bool """ return True @@ -264,7 +273,7 @@ @param vcsDataDict dictionary of data required for the import @type dict - @param projectDir project directory (string) + @param projectDir project directory @type str @param noDialog flag indicating quiet operations @type bool @@ -318,9 +327,13 @@ (clone). @param vcsDataDict dictionary of data required for the checkout - @param projectDir project directory to create (string) + @type dict + @param projectDir project directory to create + @type str @param noDialog flag indicating quiet operations - @return flag indicating an execution without errors (boolean) + @type bool + @return flag indicating an execution without errors + @rtype bool """ noDialog = False vcsUrl = self.gitNormalizeURL(vcsDataDict["url"]) @@ -343,8 +356,11 @@ Public method used to export a directory from the Git repository. @param vcsDataDict dictionary of data required for the checkout - @param projectDir project directory to create (string) - @return flag indicating an execution without errors (boolean) + @type dict + @param projectDir project directory to create + @type str + @return flag indicating an execution without errors + @rtype bool """ status = self.vcsCheckout(vcsDataDict, projectDir) adminPath = os.path.join(projectDir, self.adminDirOrFile) @@ -361,12 +377,16 @@ Public method used to make the change of a file/directory permanent in the Git repository. - @param name file/directory name to be committed (string or list of - strings) - @param message message for this operation (string) - @param noDialog flag indicating quiet operations (boolean) - @param commitAll flag indicating to commit all local changes (boolean) - @param amend flag indicating to amend the HEAD commit (boolean) + @param name file/directory name to be committed + @type str or list of str + @param message message for this operation + @type str + @param noDialog flag indicating quiet operations + @type bool + @param commitAll flag indicating to commit all local changes + @type bool + @param amend flag indicating to amend the HEAD commit + @type bool """ from .GitCommitDialog import GitCommitDialog @@ -532,12 +552,14 @@ Public method used to update a file/directory with the Git repository. - @param name file/directory name to be updated (string or list of - strings) - @param noDialog flag indicating quiet operations (boolean) - @param revision revision to update to (string) - @return flag indicating, that the update contained an add - or delete (boolean) + @param name file/directory name to be updated + @type str or list of str + @param noDialog flag indicating quiet operations + @type bool + @param revision revision to update to + @type str + @return flag indicating, that the update contained an add or delete + @rtype bool """ args = self.initCommand("checkout") if revision: @@ -584,9 +606,12 @@ """ Public method used to add a file/directory to the Git repository. - @param name file/directory name to be added (string) - @param isDir flag indicating name is a directory (boolean) + @param name file/directory name to be added + @type str + @param isDir flag indicating name is a directory + @type bool @param noDialog flag indicating quiet operations + @type bool """ args = self.initCommand("add") args.append("-v") @@ -627,8 +652,10 @@ Public method used to add a file/directory in binary mode to the Git repository. - @param name file/directory name to be added (string) - @param isDir flag indicating name is a directory (boolean) + @param name file/directory name to be added + @type str + @param isDir flag indicating name is a directory + @type bool """ self.vcsAdd(name, isDir) @@ -637,8 +664,8 @@ Public method to add a directory tree rooted at path to the Git repository. - @param path root directory of the tree to be added (string or list of - strings)) + @param path root directory of the tree to be added + @type str or list of str """ self.vcsAdd(path, isDir=False) @@ -651,14 +678,17 @@ The default operation is to remove the local copy as well. - @param name file/directory name to be removed (string or list of - strings)) - @param project flag indicating deletion of a project tree (boolean) - (not needed) - @param noDialog flag indicating quiet operations (boolean) + @param name file/directory name to be removed + @type str or list of str + @param project flag indicating deletion of a project tree + @type bool + @param noDialog flag indicating quiet operations + @type bool @param stageOnly flag indicating to just remove the file from the - staging area (boolean) - @return flag indicating successful operation (boolean) + staging area + @type bool + @return flag indicating successful operation + @rtype bool """ args = self.initCommand("rm") if noDialog and "--force" not in args: @@ -712,11 +742,16 @@ """ Public method used to move a file/directory. - @param name file/directory name to be moved (string) + @param name file/directory name to be moved + @type str @param project reference to the project object - @param target new name of the file/directory (string) + @type Project + @param target new name of the file/directory + @type str @param noDialog flag indicating quiet operations - @return flag indicating successful operation (boolean) + @type bool + @return flag indicating successful operation + @rtype bool """ from .GitCopyDialog import GitCopyDialog @@ -774,9 +809,10 @@ Public method used to browse the log of a file/directory from the Git repository. - @param name file/directory name to show the log of (string) + @param name file/directory name to show the log of + @type str @param isFile flag indicating log for a file is to be shown - (boolean) + @type bool """ from .GitLogBrowserDialog import GitLogBrowserDialog @@ -790,7 +826,8 @@ """ Public method used to browse the reflog of the project. - @param projectDir name of the project directory (string) + @param projectDir name of the project directory + @type str """ from .GitReflogBrowserDialog import GitReflogBrowserDialog @@ -810,7 +847,8 @@ being edited and has unsaved modification, they can be saved or the operation may be aborted. - @param name file/directory name to be diffed (string) + @param name file/directory name to be diffed + @type str """ from .GitDiffDialog import GitDiffDialog @@ -837,7 +875,7 @@ Git repository. @param name file/directory name(s) to show the status of - (string or list of strings) + @type str or list of str """ from .GitStatusDialog import GitStatusDialog @@ -851,9 +889,10 @@ """ Public method used to unstage a file/directory. - @param name file/directory name to be reverted (string) - @return flag indicating, that the update contained an add - or delete (boolean) + @param name file/directory name to be reverted + @type str + @return flag indicating, that the update contained an add or delete + @rtype bool """ if isinstance(name, list): dname, fnames = self.splitPathList(name) @@ -948,7 +987,8 @@ """ Public method used to merge a URL/revision into the local project. - @param name file/directory name to be merged (string) + @param name file/directory name to be merged + @type str """ from .GitMergeDialog import GitMergeDialog @@ -996,9 +1036,10 @@ Public method used to switch a working directory to a different revision. - @param name directory name to be switched (string) - @return flag indicating, that the switch contained an add - or delete (boolean) + @param name directory name to be switched + @type str + @return flag indicating, that the switch contained an add or delete + @rtype bool """ from .GitRevisionSelectionDialog import GitRevisionSelectionDialog @@ -1025,8 +1066,10 @@ """ Public method used to get the registered state of a file in the vcs. - @param name filename to check (string) - @return a combination of canBeCommited and canBeAdded + @param name filename to check + @type str + @return registered state (one of canBeCommited and canBeAdded) + @rtype int """ if name.endswith(os.sep): name = name[:-1] @@ -1091,10 +1134,14 @@ that the states for all files have been populated by the previous run. @param names dictionary with all filenames to be checked as keys - @param dname directory to check in (string) - @param shortcut flag indicating a shortcut should be taken (boolean) + @type dict + @param dname directory to check in + @type str + @param shortcut flag indicating a shortcut should be taken + @type bool @return the received dictionary completed with a combination of canBeCommited and canBeAdded or None in order to signal an error + @rtype dict """ if dname.endswith(os.sep): dname = dname[:-1] @@ -1168,7 +1215,8 @@ """ Public method returning the name of the vcs. - @return always 'Git' (string) + @return always 'Git' + @rtype str """ return "Git" @@ -1178,7 +1226,8 @@ This method ensures, that an ignore file exists. - @param project reference to the project (Project) + @param project reference to the project + @type Project """ ppath = project.getProjectPath() if ppath: @@ -1190,7 +1239,8 @@ """ Public method used to cleanup the working directory. - @param name directory name to be cleaned up (string) + @param name directory name to be cleaned up + @type str """ patterns = self.__plugin.getPreferences("CleanupPatterns").split() @@ -1206,7 +1256,8 @@ """ Public method used to execute arbitrary Git commands. - @param name directory name of the working directory (string) + @param name directory name of the working directory + @type str """ from .GitCommandDialog import GitCommandDialog @@ -1241,11 +1292,15 @@ Public method to get a dialog to enter repository info. @param project reference to the project object - @param archive name of the project in the repository (string) + @type Project + @param archive name of the project in the repository + @type str @param editable flag indicating that the project name is editable - (boolean) - @param parent parent widget (QWidget) - @return reference to the instantiated options dialog (GitOptionsDialog) + @type bool + @param parent parent widget + @type QWidget + @return reference to the instantiated options dialog + @rtype GitOptionsDialog """ from .GitOptionsDialog import GitOptionsDialog @@ -1256,9 +1311,10 @@ Public method to get a dialog to enter repository info for getting a new project. - @param parent parent widget (QWidget) + @param parent parent widget + @type QWidget @return reference to the instantiated options dialog - (GitNewProjectOptionsDialog) + @rtype GitNewProjectOptionsDialog """ from .GitNewProjectOptionsDialog import GitNewProjectOptionsDialog @@ -1268,8 +1324,10 @@ """ Public method to retrieve information about the repository. - @param ppath local path to get the repository infos (string) - @return string with ready formated info for display (string) + @param ppath local path to get the repository infos + @type str + @return string with ready formated info for display + @rtype str """ formatTemplate = ( "format:" @@ -1394,7 +1452,7 @@ Public method to signal the support of user settable command options. @return flag indicating the support of user settable command options - (boolean) + @rtype bool """ return False @@ -1406,8 +1464,10 @@ """ Public method to normalize a url for Git. - @param url url string (string) - @return properly normalized url for git (string) + @param url url string + @type str + @return properly normalized url for git + @rtype str """ url = url.replace("\\", "/") if url.endswith("/"): @@ -1422,9 +1482,12 @@ """ Public method to create the ignore file. - @param name directory name to create the ignore file in (string) - @param autoAdd flag indicating to add it automatically (boolean) + @param name directory name to create the ignore file in + @type str + @param autoAdd flag indicating to add it automatically + @type bool @return flag indicating success + @rtype bool """ status = False ignorePatterns = [ @@ -1486,9 +1549,12 @@ """ Public method used to copy a file/directory. - @param name file/directory name to be copied (string) + @param name file/directory name to be copied + @type str @param project reference to the project object - @return flag indicating successful operation (boolean) + @type Project + @return flag indicating successful operation + @rtype bool """ from .GitCopyDialog import GitCopyDialog @@ -1562,7 +1628,8 @@ This method gives the chance to enter the revisions to be compared. - @param name file/directory name to be diffed (string) + @param name file/directory name to be diffed + @type str """ from .GitDiffDialog import GitDiffDialog from .GitRevisionsSelectionDialog import GitRevisionsSelectionDialog @@ -1604,9 +1671,12 @@ Private method to get a file for a specific revision from the repository. - @param name file name to get from the repository (string) - @param rev revision to retrieve (string) - @return contents of the file (string) and an error message (string) + @param name file name to get from the repository + @type str + @param rev revision to retrieve + @type str + @return contents of the file (string) and an error message + @rtype str """ # find the root of the repo repodir = self.findRepoRoot(self.splitPath(name)[0]) @@ -1655,9 +1725,12 @@ Public method used to view the difference of a file to the Git repository side-by-side. - @param name file name to be diffed (string) - @param extended flag indicating the extended variant (boolean) - @param revisions tuple of two revisions (tuple of strings) + @param name file name to be diffed + @type str + @param extended flag indicating the extended variant + @type bool + @param revisions tuple of two revisions + @type tuple of (str, str) @exception ValueError raised to indicate an invalid name parameter """ from eric7.UI.CompareDialog import CompareDialog @@ -1727,7 +1800,8 @@ """ Public method to fetch changes from a remote repository. - @param name directory name (string) + @param name directory name + @type str """ from .GitFetchDialog import GitFetchDialog @@ -1773,9 +1847,10 @@ """ Public method used to pull changes from a remote Git repository. - @param name directory name of the project to be pulled to (string) - @return flag indicating, that the update contained an add - or delete (boolean) + @param name directory name of the project to be pulled to + @type str + @return flag indicating, that the update contained an add or delete + @rtype bool """ from .GitPullDialog import GitPullDialog @@ -1813,7 +1888,8 @@ """ Public method used to push changes to a remote Git repository. - @param name directory name of the project to be pushed from (string) + @param name directory name of the project to be pushed from + @type str """ from .GitPushDialog import GitPushDialog @@ -1848,7 +1924,8 @@ """ Public method to commit a failed merge. - @param name file/directory name (string) + @param name file/directory name + @type str """ dname, fname = self.splitPath(name) @@ -1877,9 +1954,10 @@ """ Public method to cancel an uncommitted or failed merge. - @param name file/directory name (string) - @return flag indicating, that the cancellation contained an add - or delete (boolean) + @param name file/directory name + @type str + @return flag indicating, that the cancellation contained an add or delete + @rtype bool """ dname, fname = self.splitPath(name) @@ -1903,12 +1981,16 @@ """ Public method to apply a patch stored in a given file. - @param repodir directory name of the repository (string) - @param patchFile name of the patch file (string) + @param repodir directory name of the repository + @type str + @param patchFile name of the patch file + @type str @param cached flag indicating to apply the patch to the staging area - (boolean) - @param reverse flag indicating to apply the patch in reverse (boolean) - @param noDialog flag indicating quiet operations (boolean) + @type bool + @param reverse flag indicating to apply the patch in reverse + @type bool + @param noDialog flag indicating quiet operations + @type bool """ args = self.initCommand("apply") if cached: @@ -1931,8 +2013,10 @@ Public method to apply a list of patch files or check, if they would apply cleanly. - @param projectDir directory name of the project (string) - @param check flag indicating to perform a check operation (boolean) + @param projectDir directory name of the project + @type str + @param check flag indicating to perform a check operation + @type bool """ from .GitPatchFilesDialog import GitPatchFilesDialog @@ -1976,7 +2060,8 @@ """ Public method to show statistics for a set of patch files. - @param projectDir directory name of the project (string) + @param projectDir directory name of the project + @type str """ from .GitPatchStatisticsDialog import GitPatchStatisticsDialog @@ -1996,10 +2081,13 @@ Public method used to set/remove a tag in the Git repository. @param name file/directory name to determine the repo root from - (string) - @param revision revision to set tag for (string) - @param tagName name of the tag (string) - @return flag indicating a performed tag action (boolean) + @type str + @param revision revision to set tag for + @type str + @param tagName name of the tag + @type str + @return flag indicating a performed tag action + @rtype bool """ from .GitTagDialog import GitTagDialog @@ -2048,10 +2136,11 @@ """ Public method to get the list of tags. - @param repodir directory name of the repository (string) - @return list of tags (list of string) or list of tuples of - tag name and flag indicating a local tag (list of tuple of string - and boolean), if withType is True + @param repodir directory name of the repository + @type str + @return list of tags or list of tuples of tag name and flag indicating + a local tag, if withType is True + @rtype list of str or list of tuple of (str, bool) """ args = self.initCommand("tag") args.append("--list") @@ -2082,12 +2171,15 @@ """ Public method used to list the available tags or branches. - @param path directory name of the project (string) + @param path directory name of the project + @type str @param tags flag indicating listing of branches or tags (False = branches, True = tags) - @param listAll flag indicating to show all tags or branches (boolean) - @param merged flag indicating to show only merged or non-merged - branches (boolean) + @type bool + @param listAll flag indicating to show all tags or branches + @type bool + @param merged flag indicating to show only merged or non-merged branches + @type bool """ from .GitTagBranchListDialog import GitTagBranchListDialog @@ -2110,11 +2202,16 @@ """ Public method to get the list of branches. - @param repodir directory name of the repository (string) - @param withMain flag indicating to get 'main' as well (boolean) - @param allBranches flag indicating to return all branches (boolean) - @param remotes flag indicating to return remote branches only (boolean) - @return list of branches (list of string) + @param repodir directory name of the repository + @type str + @param withMain flag indicating to get 'main' as well + @type bool + @param allBranches flag indicating to return all branches + @type bool + @param remotes flag indicating to return remote branches only + @type bool + @return list of branches + @rtype list of str """ args = self.initCommand("branch") args.append("--list") @@ -2155,8 +2252,10 @@ """ Public method used to show the current branch of the working directory. - @param repodir directory name of the repository (string) - @return name of the current branch (string) + @param repodir directory name of the repository + @type str + @return name of the current branch + @rtype str """ args = self.initCommand("branch") args.append("--list") @@ -2192,13 +2291,17 @@ Public method used to create, delete or move a branch in the Git repository. - @param name file/directory name to be branched (string) - @param revision revision to set tag for (string) - @param branchName name of the branch (string) - @param branchOp desired branch operation (integer) - @return flag indicating a performed branch action (boolean) and - a flag indicating, that the branch operation contained an add - or delete (boolean) + @param name file/directory name to be branched + @type str + @param revision revision to set tag for + @type str + @param branchName name of the branch + @type str + @param branchOp desired branch operation + @type int + @return flag indicating a performed branch action and a flag indicating, + that the branch operation contained an add or delete + @rtype tuple of (bool, bool) """ from .GitBranchDialog import GitBranchDialog @@ -2300,7 +2403,8 @@ """ Public method to delete a branch from a remote repository. - @param name file/directory name (string) + @param name file/directory name + @type str """ from .GitBranchPushDialog import GitBranchPushDialog @@ -2332,7 +2436,8 @@ """ Public method used to show the current branch of the working directory. - @param name file/directory name (string) + @param name file/directory name + @type str """ dname, fname = self.splitPath(name) @@ -2356,7 +2461,8 @@ """ Public method to create a bundle file. - @param projectDir name of the project directory (string) + @param projectDir name of the project directory + @type str """ from .GitBundleDialog import GitBundleDialog @@ -2418,7 +2524,8 @@ """ Public method to verify a bundle file. - @param projectDir name of the project directory (string) + @param projectDir name of the project directory + @type str """ # find the root of the repo repodir = self.findRepoRoot(projectDir) @@ -2447,7 +2554,8 @@ """ Public method to list the heads contained in a bundle file. - @param projectDir name of the project directory (string) + @param projectDir name of the project directory + @type str """ # find the root of the repo repodir = self.findRepoRoot(projectDir) @@ -2476,9 +2584,12 @@ """ Public method to get a list of heads contained in a bundle file. - @param repodir directory name of the repository (string) - @param bundleFile file name of a git bundle file (string) - @return list of heads (list of strings) + @param repodir directory name of the repository + @type str + @param bundleFile file name of a git bundle file + @type str + @return list of heads + @rtype list of str """ args = self.initCommand("bundle") args.append("list-heads") @@ -2511,7 +2622,8 @@ Public method to fetch a head of a bundle file into the local repository. - @param projectDir name of the project directory (string) + @param projectDir name of the project directory + @type str """ from .GitApplyBundleDataDialog import GitApplyBundleDataDialog @@ -2555,9 +2667,10 @@ Public method to pull a head of a bundle file into the local repository and working area. - @param projectDir name of the project directory (string) - @return flag indicating, that the update contained an add - or delete (boolean) + @param projectDir name of the project directory + @type str + @return flag indicating, that the update contained an add or delete + @rtype bool """ from .GitApplyBundleDataDialog import GitApplyBundleDataDialog @@ -2607,11 +2720,13 @@ """ Public method to perform bisect commands. - @param projectDir name of the project directory (string) - @param subcommand name of the subcommand (string, one of 'start', + @param projectDir name of the project directory + @type str + @param subcommand name of the subcommand (one of 'start', 'start_extended', 'good', 'bad', 'skip' or 'reset') - @return flag indicating, that the update contained an add - or delete (boolean) + @type str + @return flag indicating, that the update contained an add or delete + @rtype bool @exception ValueError raised to indicate an invalid bisect subcommand """ from .GitBisectStartDialog import GitBisectStartDialog @@ -2682,7 +2797,8 @@ """ Public method used to browse the bisect log of the project. - @param projectDir name of the project directory (string) + @param projectDir name of the project directory + @type str """ from .GitBisectLogBrowserDialog import GitBisectLogBrowserDialog @@ -2696,7 +2812,8 @@ """ Public method used to create a bisect replay file for the project. - @param projectDir name of the project directory (string) + @param projectDir name of the project directory + @type str """ # find the root of the repo repodir = self.findRepoRoot(projectDir) @@ -2779,7 +2896,8 @@ """ Public method used to edit a bisect replay file. - @param projectDir name of the project directory (string) + @param projectDir name of the project directory + @type str """ # find the root of the repo repodir = self.findRepoRoot(projectDir) @@ -2802,9 +2920,10 @@ """ Public method to replay a bisect session. - @param projectDir name of the project directory (string) - @return flag indicating, that the update contained an add - or delete (boolean) + @param projectDir name of the project directory + @type str + @return flag indicating, that the update contained an add or delete + @rtype bool """ # find the root of the repo repodir = self.findRepoRoot(projectDir) @@ -2842,8 +2961,10 @@ """ Public method to get the list of remote repos. - @param repodir directory name of the repository (string) - @return list of remote repos (list of string) + @param repodir directory name of the repository + @type str + @return list of remote repos + @rtype list of str """ args = self.initCommand("remote") @@ -2873,10 +2994,12 @@ """ Public method to get the list of remote repos and their URLs. - @param repodir directory name of the repository (string) - @param forFetch flag indicating to get Fetch info (string) - @return list of tuples of remote repo name and repo URL (list of - tuple of two strings) + @param repodir directory name of the repository + @type str + @param forFetch flag indicating to get Fetch info + @type str + @return list of tuples of remote repo name and repo URL + @rtype list of [(str, str)] """ args = self.initCommand("remote") args.append("--verbose") @@ -2942,9 +3065,12 @@ """ Public method to get the list of a remote repository branches. - @param repodir directory name of the repository (string) - @param remote remote repository name (string) - @return list of remote repository branches (list of string) + @param repodir directory name of the repository + @type str + @param remote remote repository name + @type str + @return list of remote repository branches + @rtype list of str """ args = self.initCommand("ls-remote") args.append("--heads") @@ -2976,8 +3102,10 @@ """ Public method to show information about a remote repository. - @param projectDir name of the project directory (string) - @param remoteName name of the remote repository (string) + @param projectDir name of the project directory + @type str + @param remoteName name of the remote repository + @type str """ # find the root of the repo repodir = self.findRepoRoot(projectDir) @@ -2997,7 +3125,8 @@ """ Public method to show available remote repositories. - @param projectDir name of the project directory (string) + @param projectDir name of the project directory + @type str """ from .GitRemoteRepositoriesDialog import GitRemoteRepositoriesDialog @@ -3011,7 +3140,8 @@ """ Public method to add a remote repository. - @param projectDir name of the project directory (string) + @param projectDir name of the project directory + @type str """ from .GitAddRemoteDialog import GitAddRemoteDialog @@ -3034,8 +3164,10 @@ """ Public method to rename a remote repository. - @param projectDir name of the project directory (string) - @param remoteName name of the remote repository (string) + @param projectDir name of the project directory + @type str + @param remoteName name of the remote repository + @type str """ # find the root of the repo repodir = self.findRepoRoot(projectDir) @@ -3128,8 +3260,10 @@ """ Public method to remove a remote repository. - @param projectDir name of the project directory (string) - @param remoteName name of the remote repository (string) + @param projectDir name of the project directory + @type str + @param remoteName name of the remote repository + @type str """ # find the root of the repo repodir = self.findRepoRoot(projectDir) @@ -3146,8 +3280,10 @@ """ Public method to prune stale remote-tracking branches. - @param projectDir name of the project directory (string) - @param remoteName name of the remote repository (string) + @param projectDir name of the project directory + @type str + @param remoteName name of the remote repository + @type str """ # find the root of the repo repodir = self.findRepoRoot(projectDir) @@ -3168,8 +3304,10 @@ Public method to show a short log suitable for inclusion in release announcements. - @param projectDir name of the project directory (string) - @param commit commit to start the log at (strings) + @param projectDir name of the project directory + @type str + @param commit commit to start the log at + @type str """ # find the root of the repo repodir = self.findRepoRoot(projectDir) @@ -3189,9 +3327,10 @@ """ Public method to find the most recent tag reachable from each commit. - @param projectDir name of the project directory (string) + @param projectDir name of the project directory + @type str @param commits list of commits to start the search from - (list of strings) + @type list of str """ from .GitDescribeDialog import GitDescribeDialog @@ -3210,9 +3349,12 @@ Public method to cherry pick commits and apply them to the current branch. - @param projectDir name of the project directory (string) - @param commits list of commits to be applied (list of strings) - @return flag indicating that the project should be reread (boolean) + @param projectDir name of the project directory + @type str + @param commits list of commits to be applied + @type list of str + @return flag indicating that the project should be reread + @rtype bool """ from .GitCherryPickDialog import GitCherryPickDialog @@ -3250,8 +3392,10 @@ Public method to continue the last copying session after conflicts were resolved. - @param projectDir name of the project directory (string) - @return flag indicating that the project should be reread (boolean) + @param projectDir name of the project directory + @type str + @return flag indicating that the project should be reread + @rtype bool """ # find the root of the repo repodir = self.findRepoRoot(projectDir) @@ -3280,8 +3424,10 @@ """ Public method to quit the current copying operation. - @param projectDir name of the project directory (string) - @return flag indicating that the project should be reread (boolean) + @param projectDir name of the project directory + @type str + @return flag indicating that the project should be reread + @rtype bool """ # find the root of the repo repodir = self.findRepoRoot(projectDir) @@ -3304,8 +3450,10 @@ Public method to cancel the last copying session and return to the previous state. - @param projectDir name of the project directory (string) - @return flag indicating that the project should be reread (boolean) + @param projectDir name of the project directory + @type str + @return flag indicating that the project should be reread + @rtype bool """ # find the root of the repo repodir = self.findRepoRoot(projectDir) @@ -3331,8 +3479,10 @@ """ Private method to get a list of stash names. - @param projectDir name of the project directory (string) - @return list of available stashes (list of string) + @param projectDir name of the project directory + @type str + @return list of available stashes + @rtype list of str """ # find the root of the repo repodir = self.findRepoRoot(projectDir) @@ -3367,9 +3517,10 @@ """ Public method to save the current changes to a new stash. - @param projectDir name of the project directory (string) - @return flag indicating, that the save contained an add - or delete (boolean) + @param projectDir name of the project directory + @type str + @return flag indicating, that the save contained an add or delete + @rtype bool """ from .GitStashDataDialog import GitStashDataDialog @@ -3405,7 +3556,8 @@ """ Public method used to browse the stashed changes. - @param projectDir name of the project directory (string) + @param projectDir name of the project directory + @type str """ from .GitStashBrowserDialog import GitStashBrowserDialog @@ -3419,8 +3571,10 @@ """ Public method to show the contents of a stash. - @param projectDir name of the project directory (string) - @param stashName name of a stash (string) + @param projectDir name of the project directory + @type str + @param stashName name of a stash + @type str """ from .GitDiffDialog import GitDiffDialog @@ -3452,10 +3606,12 @@ """ Public method to apply a stash but keep it. - @param projectDir name of the project directory (string) - @param stashName name of a stash (string) - @return flag indicating, that the restore contained an add - or delete (boolean) + @param projectDir name of the project directory + @type str + @param stashName name of a stash + @type str + @return flag indicating, that the restore contained an add or delete + @rtype bool """ # find the root of the repo repodir = self.findRepoRoot(projectDir) @@ -3492,10 +3648,12 @@ """ Public method to apply a stash and delete it. - @param projectDir name of the project directory (string) - @param stashName name of a stash (string) - @return flag indicating, that the restore contained an add - or delete (boolean) + @param projectDir name of the project directory + @type str + @param stashName name of a stash + @type str + @return flag indicating, that the restore contained an add or delete + @rtype bool """ # find the root of the repo repodir = self.findRepoRoot(projectDir) @@ -3532,10 +3690,12 @@ """ Public method to create a branch from a stash. - @param projectDir name of the project directory (string) - @param stashName name of a stash (string) - @return flag indicating, that the restore contained an add - or delete (boolean) + @param projectDir name of the project directory + @type str + @param stashName name of a stash + @type str + @return flag indicating, that the restore contained an add or delete + @rtype bool """ # find the root of the repo repodir = self.findRepoRoot(projectDir) @@ -3582,9 +3742,12 @@ """ Public method to delete a stash. - @param projectDir name of the project directory (string) - @param stashName name of a stash (string) - @return flag indicating a successful deletion (boolean) + @param projectDir name of the project directory + @type str + @param stashName name of a stash + @type str + @return flag indicating a successful deletion + @rtype bool """ # find the root of the repo repodir = self.findRepoRoot(projectDir) @@ -3627,8 +3790,10 @@ """ Public method to delete all stashes. - @param projectDir name of the project directory (string) - @return flag indicating a successful deletion (boolean) + @param projectDir name of the project directory + @type str + @return flag indicating a successful deletion + @rtype bool """ # find the root of the repo repodir = self.findRepoRoot(projectDir) @@ -3654,7 +3819,8 @@ """ Public method used to edit the repository configuration file. - @param projectDir name of the project directory (string) + @param projectDir name of the project directory + @type str """ # find the root of the repo repodir = self.findRepoRoot(projectDir) @@ -3694,7 +3860,8 @@ """ Public method to show the combined configuration. - @param projectDir name of the project directory (string) + @param projectDir name of the project directory + @type str """ # find the root of the repo repodir = self.findRepoRoot(projectDir) @@ -3714,7 +3881,8 @@ Public method to verify the connectivity and validity of objects of the database. - @param projectDir name of the project directory (string) + @param projectDir name of the project directory + @type str """ # find the root of the repo repodir = self.findRepoRoot(projectDir) @@ -3735,7 +3903,8 @@ """ Public method to cleanup and optimize the local repository. - @param projectDir name of the project directory (string) + @param projectDir name of the project directory + @type str """ # find the root of the repo repodir = self.findRepoRoot(projectDir) @@ -3756,7 +3925,8 @@ """ Public method to show some statistics of the local repository. - @param projectDir name of the project directory (string) + @param projectDir name of the project directory + @type str """ # find the root of the repo repodir = self.findRepoRoot(projectDir) @@ -3844,8 +4014,10 @@ """ Public method to get a list of supported archive formats. - @param repodir directory name of the repository (string) - @return list of supported archive formats (list of strings) + @param repodir directory name of the repository + @type str + @return list of supported archive formats + @rtype list of str """ args = self.initCommand("archive") args.append("--list") @@ -3876,7 +4048,8 @@ """ Public method to show some statistics of the local repository. - @param projectDir name of the project directory (string) + @param projectDir name of the project directory + @type str """ from .GitArchiveDataDialog import GitArchiveDataDialog @@ -4297,10 +4470,14 @@ project browsers. @param browser reference to the project browser object + @type ProjectBaseBrowser @param project reference to the project object + @type Project @param isTranslationsBrowser flag indicating, the helper is requested for the translations browser (this needs some special treatment) + @type bool @return the project browser helper object + @rtype GitProjectBrowserHelper """ from .ProjectBrowserHelper import GitProjectBrowserHelper @@ -4311,7 +4488,9 @@ Public method to instantiate a helper object for the project. @param project reference to the project object + @type Project @return the project helper object + @rtype GitProjectHelper """ self.__projectHelper = self.__plugin.getProjectHelper() self.__projectHelper.setObjects(self, project) @@ -4327,9 +4506,11 @@ thread. @param interval check interval for the monitor thread in seconds - (integer) - @param project reference to the project object (Project) - @return reference to the monitor thread (QThread) + @type int + @param project reference to the project object + @type Project + @return reference to the monitor thread + @rtype GitStatusMonitorThread """ from .GitStatusMonitorThread import GitStatusMonitorThread