214 else: |
214 else: |
215 errMsg = self.tr("Could not start the git executable.") |
215 errMsg = self.tr("Could not start the git executable.") |
216 |
216 |
217 return False, errMsg |
217 return False, errMsg |
218 |
218 |
219 def vcsInit(self, vcsDir, noDialog=False): |
219 def vcsInit(self, vcsDir, noDialog=False): # noqa: U100 |
220 """ |
220 """ |
221 Public method used to initialize the Git repository. |
221 Public method used to initialize the Git repository. |
222 |
222 |
223 The initialization is done, when a project is converted into a |
223 The initialization is done, when a project is converted into a |
224 Git controlled project. Therefore we always return TRUE without |
224 Git controlled project. Therefore we always return TRUE without |
254 if not os.path.isfile(pfn): |
254 if not os.path.isfile(pfn): |
255 pfn += "z" |
255 pfn += "z" |
256 project.closeProject() |
256 project.closeProject() |
257 project.openProject(pfn) |
257 project.openProject(pfn) |
258 |
258 |
259 def vcsImport(self, vcsDataDict, projectDir, noDialog=False, addAll=True): |
259 def vcsImport( |
|
260 self, vcsDataDict, projectDir, noDialog=False, addAll=True # noqa: U100 |
|
261 ): |
260 """ |
262 """ |
261 Public method used to import the project into the Git repository. |
263 Public method used to import the project into the Git repository. |
262 |
264 |
263 @param vcsDataDict dictionary of data required for the import |
265 @param vcsDataDict dictionary of data required for the import |
264 @type dict |
266 @type dict |
638 @param path root directory of the tree to be added (string or list of |
640 @param path root directory of the tree to be added (string or list of |
639 strings)) |
641 strings)) |
640 """ |
642 """ |
641 self.vcsAdd(path, isDir=False) |
643 self.vcsAdd(path, isDir=False) |
642 |
644 |
643 def vcsRemove(self, name, project=False, noDialog=False, stageOnly=False): |
645 def vcsRemove( |
|
646 self, name, project=False, noDialog=False, stageOnly=False # noqa: U100 |
|
647 ): |
644 """ |
648 """ |
645 Public method used to remove a file/directory from the Git |
649 Public method used to remove a file/directory from the Git |
646 repository. |
650 repository. |
647 |
651 |
648 The default operation is to remove the local copy as well. |
652 The default operation is to remove the local copy as well. |
1075 else: |
1079 else: |
1076 return self.canBeCommitted |
1080 return self.canBeCommitted |
1077 |
1081 |
1078 return self.canBeAdded |
1082 return self.canBeAdded |
1079 |
1083 |
1080 def vcsAllRegisteredStates(self, names, dname, shortcut=True): |
1084 def vcsAllRegisteredStates(self, names, dname, shortcut=True): # noqa: U100 |
1081 """ |
1085 """ |
1082 Public method used to get the registered states of a number of files |
1086 Public method used to get the registered states of a number of files |
1083 in the vcs. |
1087 in the vcs. |
1084 |
1088 |
1085 <b>Note:</b> If a shortcut is to be taken, the code will only check, |
1089 <b>Note:</b> If a shortcut is to be taken, the code will only check, |
1228 dia = GitDialog(self.tr("Git Command"), self) |
1232 dia = GitDialog(self.tr("Git Command"), self) |
1229 res = dia.startProcess(args, repodir) |
1233 res = dia.startProcess(args, repodir) |
1230 if res: |
1234 if res: |
1231 dia.exec() |
1235 dia.exec() |
1232 |
1236 |
1233 def vcsOptionsDialog(self, project, archive, editable=False, parent=None): |
1237 def vcsOptionsDialog( |
|
1238 self, project, archive, editable=False, parent=None # noqa: U100 |
|
1239 ): |
1234 """ |
1240 """ |
1235 Public method to get a dialog to enter repository info. |
1241 Public method to get a dialog to enter repository info. |
1236 |
1242 |
1237 @param project reference to the project object |
1243 @param project reference to the project object |
1238 @param archive name of the project in the repository (string) |
1244 @param archive name of the project in the repository (string) |
2036 if res: |
2042 if res: |
2037 dia.exec() |
2043 dia.exec() |
2038 |
2044 |
2039 return True |
2045 return True |
2040 |
2046 |
2041 def gitGetTagsList(self, repodir, withType=False): |
2047 def gitGetTagsList(self, repodir): |
2042 """ |
2048 """ |
2043 Public method to get the list of tags. |
2049 Public method to get the list of tags. |
2044 |
2050 |
2045 @param repodir directory name of the repository (string) |
2051 @param repodir directory name of the repository (string) |
2046 @param withType flag indicating to get the tag type as well (boolean) |
|
2047 @return list of tags (list of string) or list of tuples of |
2052 @return list of tags (list of string) or list of tuples of |
2048 tag name and flag indicating a local tag (list of tuple of string |
2053 tag name and flag indicating a local tag (list of tuple of string |
2049 and boolean), if withType is True |
2054 and boolean), if withType is True |
2050 """ |
2055 """ |
2051 args = self.initCommand("tag") |
2056 args = self.initCommand("tag") |