244 hgExists = errMsg == "" |
244 hgExists = errMsg == "" |
245 if hgExists: |
245 if hgExists: |
246 self.__getExtensionsInfo() |
246 self.__getExtensionsInfo() |
247 return hgExists, errMsg |
247 return hgExists, errMsg |
248 |
248 |
249 def vcsInit(self, vcsDir, noDialog=False): |
249 def vcsInit(self, vcsDir, noDialog=False): # noqa: U100 |
250 """ |
250 """ |
251 Public method used to initialize the mercurial repository. |
251 Public method used to initialize the mercurial repository. |
252 |
252 |
253 The initialization is done, when a project is converted into a |
253 The initialization is done, when a project is converted into a |
254 Mercurial controlled project. Therefore we always return TRUE without |
254 Mercurial controlled project. Therefore we always return TRUE without |
284 if not os.path.isfile(pfn): |
284 if not os.path.isfile(pfn): |
285 pfn += "z" |
285 pfn += "z" |
286 project.closeProject() |
286 project.closeProject() |
287 project.openProject(pfn) |
287 project.openProject(pfn) |
288 |
288 |
289 def vcsImport(self, vcsDataDict, projectDir, noDialog=False, addAll=True): |
289 def vcsImport( |
|
290 self, vcsDataDict, projectDir, noDialog=False, addAll=True # noqa: U100 |
|
291 ): |
290 """ |
292 """ |
291 Public method used to import the project into the Mercurial repository. |
293 Public method used to import the project into the Mercurial repository. |
292 |
294 |
293 @param vcsDataDict dictionary of data required for the import |
295 @param vcsDataDict dictionary of data required for the import |
294 @type dict |
296 @type dict |
596 |
598 |
597 output, error = self.__client.runcommand(args) |
599 output, error = self.__client.runcommand(args) |
598 |
600 |
599 return output |
601 return output |
600 |
602 |
601 def vcsUpdate(self, name=None, noDialog=False, revision=None): |
603 def vcsUpdate(self, name=None, noDialog=False, revision=None): # noqa: U100 |
602 """ |
604 """ |
603 Public method used to update a file/directory with the Mercurial |
605 Public method used to update a file/directory with the Mercurial |
604 repository. |
606 repository. |
605 |
607 |
606 @param name file/directory name to be updated (not used) |
608 @param name file/directory name to be updated (not used) |
626 dia.exec() |
628 dia.exec() |
627 res = dia.hasAddOrDelete() |
629 res = dia.hasAddOrDelete() |
628 self.checkVCSStatus() |
630 self.checkVCSStatus() |
629 return res |
631 return res |
630 |
632 |
631 def vcsAdd(self, name, isDir=False, noDialog=False): |
633 def vcsAdd(self, name, isDir=False, noDialog=False): # noqa: U100 |
632 """ |
634 """ |
633 Public method used to add a file/directory to the Mercurial repository. |
635 Public method used to add a file/directory to the Mercurial repository. |
634 |
636 |
635 @param name file/directory name to be added (string) |
637 @param name file/directory name to be added (string) |
636 @param isDir flag indicating name is a directory (boolean) |
638 @param isDir flag indicating name is a directory (boolean) |
672 @param path root directory of the tree to be added (string or list of |
674 @param path root directory of the tree to be added (string or list of |
673 strings)) |
675 strings)) |
674 """ |
676 """ |
675 self.vcsAdd(path, isDir=False) |
677 self.vcsAdd(path, isDir=False) |
676 |
678 |
677 def vcsRemove(self, name, project=False, noDialog=False): |
679 def vcsRemove(self, name, project=False, noDialog=False): # noqa: U100 |
678 """ |
680 """ |
679 Public method used to remove a file/directory from the Mercurial |
681 Public method used to remove a file/directory from the Mercurial |
680 repository. |
682 repository. |
681 |
683 |
682 The default operation is to remove the local copy as well. |
684 The default operation is to remove the local copy as well. |
831 self.summary = HgSummaryDialog(self) |
833 self.summary = HgSummaryDialog(self) |
832 self.summary.show() |
834 self.summary.show() |
833 self.summary.raise_() |
835 self.summary.raise_() |
834 self.summary.start(mq=mq, largefiles=largefiles) |
836 self.summary.start(mq=mq, largefiles=largefiles) |
835 |
837 |
836 def vcsTag(self, name=None, revision=None, tagName=None): |
838 def vcsTag(self, name=None, revision=None, tagName=None): # noqa: U100 |
837 """ |
839 """ |
838 Public method used to set/remove a tag in the Mercurial repository. |
840 Public method used to set/remove a tag in the Mercurial repository. |
839 |
841 |
840 @param name file/directory name to determine the repo root from |
842 @param name file/directory name to determine the repo root from |
841 (string) |
843 (string) |
1082 if flag not in "?I" and absname == name: |
1084 if flag not in "?I" and absname == name: |
1083 return self.canBeCommitted |
1085 return self.canBeCommitted |
1084 |
1086 |
1085 return self.canBeAdded |
1087 return self.canBeAdded |
1086 |
1088 |
1087 def vcsAllRegisteredStates(self, names, dname, shortcut=True): |
1089 def vcsAllRegisteredStates(self, names, dname, shortcut=True): # noqa: U100 |
1088 """ |
1090 """ |
1089 Public method used to get the registered states of a number of files |
1091 Public method used to get the registered states of a number of files |
1090 in the vcs. |
1092 in the vcs. |
1091 |
1093 |
1092 <b>Note:</b> If a shortcut is to be taken, the code will only check, |
1094 <b>Note:</b> If a shortcut is to be taken, the code will only check, |
1214 dia = HgDialog(self.tr("Mercurial command"), self) |
1216 dia = HgDialog(self.tr("Mercurial command"), self) |
1215 res = dia.startProcess(args) |
1217 res = dia.startProcess(args) |
1216 if res: |
1218 if res: |
1217 dia.exec() |
1219 dia.exec() |
1218 |
1220 |
1219 def vcsOptionsDialog(self, project, archive, editable=False, parent=None): |
1221 def vcsOptionsDialog( |
|
1222 self, project, archive, editable=False, parent=None # noqa: U100 |
|
1223 ): |
1220 """ |
1224 """ |
1221 Public method to get a dialog to enter repository info. |
1225 Public method to get a dialog to enter repository info. |
1222 |
1226 |
1223 @param project reference to the project object |
1227 @param project reference to the project object |
1224 @param archive name of the project in the repository (string) |
1228 @param archive name of the project in the repository (string) |
1242 """ |
1246 """ |
1243 from .HgNewProjectOptionsDialog import HgNewProjectOptionsDialog |
1247 from .HgNewProjectOptionsDialog import HgNewProjectOptionsDialog |
1244 |
1248 |
1245 return HgNewProjectOptionsDialog(self, parent) |
1249 return HgNewProjectOptionsDialog(self, parent) |
1246 |
1250 |
1247 def vcsRepositoryInfos(self, ppath): |
1251 def vcsRepositoryInfos(self, ppath): # noqa: U100 |
1248 """ |
1252 """ |
1249 Public method to retrieve information about the repository. |
1253 Public method to retrieve information about the repository. |
1250 |
1254 |
1251 @param ppath local path to get the repository infos (string) |
1255 @param ppath local path to get the repository infos (string) |
1252 @return string with ready formated info for display (string) |
1256 @return string with ready formated info for display (string) |