--- a/eric6/Plugins/VcsPlugins/vcsMercurial/hg.py Mon Mar 01 17:48:43 2021 +0100 +++ b/eric6/Plugins/VcsPlugins/vcsMercurial/hg.py Tue Mar 02 17:17:09 2021 +0100 @@ -701,7 +701,7 @@ else: from .HgCopyDialog import HgCopyDialog dlg = HgCopyDialog(name, None, True) - accepted = dlg.exec() == QDialog.Accepted + accepted = dlg.exec() == QDialog.DialogCode.Accepted if accepted: target, force = dlg.getData() @@ -812,7 +812,7 @@ from .HgTagDialog import HgTagDialog dlg = HgTagDialog(self.hgGetTagsList(withType=True), revision, tagName) - if dlg.exec() == QDialog.Accepted: + if dlg.exec() == QDialog.DialogCode.Accepted: tag, revision, tagOp, force = dlg.getParameters() else: return False @@ -880,7 +880,7 @@ "Do you really want to revert all changes to these files" " or directories?"), names) - yes = dlg.exec() == QDialog.Accepted + yes = dlg.exec() == QDialog.DialogCode.Accepted else: yes = E5MessageBox.yesNo( None, @@ -913,7 +913,7 @@ dlg = HgMergeDialog(self.hgGetTagsList(), self.hgGetBranchesList(), self.hgGetBookmarksList()) - if dlg.exec() == QDialog.Accepted: + if dlg.exec() == QDialog.DialogCode.Accepted: rev, force = dlg.getParameters() else: return @@ -966,7 +966,7 @@ "Do you really want to re-merge these files" " or directories?"), names) - yes = dlg.exec() == QDialog.Accepted + yes = dlg.exec() == QDialog.DialogCode.Accepted else: yes = E5MessageBox.yesNo( None, @@ -993,7 +993,7 @@ self.hgGetBranchesList(), self.hgGetBookmarksList(), self.tr("Current branch tip")) - if dlg.exec() == QDialog.Accepted: + if dlg.exec() == QDialog.DialogCode.Accepted: rev = dlg.getRevision() return self.vcsUpdate(name, revision=rev) @@ -1154,7 +1154,7 @@ """ from .HgCommandDialog import HgCommandDialog dlg = HgCommandDialog(self.commandHistory, name) - if dlg.exec() == QDialog.Accepted: + if dlg.exec() == QDialog.DialogCode.Accepted: command = dlg.getData() commandList = Utilities.parseOptionString(command) @@ -1312,7 +1312,7 @@ from .HgCopyDialog import HgCopyDialog dlg = HgCopyDialog(name) res = False - if dlg.exec() == QDialog.Accepted: + if dlg.exec() == QDialog.DialogCode.Accepted: target, force = dlg.getData() args = self.initCommand("copy") @@ -1475,7 +1475,7 @@ dlg = HgRevisionsSelectionDialog(self.hgGetTagsList(), self.hgGetBranchesList(), self.hgGetBookmarksList()) - if dlg.exec() == QDialog.Accepted: + if dlg.exec() == QDialog.DialogCode.Accepted: revisions = dlg.getRevisions() if self.diff is None: from .HgDiffDialog import HgDiffDialog @@ -1522,7 +1522,7 @@ dlg = HgRevisionsSelectionDialog(self.hgGetTagsList(), self.hgGetBranchesList(), self.hgGetBookmarksList()) - if dlg.exec() == QDialog.Accepted: + if dlg.exec() == QDialog.DialogCode.Accepted: rev1, rev2 = dlg.getRevisions() else: return @@ -1833,7 +1833,7 @@ """ from .HgBranchInputDialog import HgBranchInputDialog dlg = HgBranchInputDialog(self.hgGetBranchesList()) - if dlg.exec() == QDialog.Accepted: + if dlg.exec() == QDialog.DialogCode.Accepted: name, commit = dlg.getData() name = name.strip().replace(" ", "_") args = self.initCommand("branch") @@ -1908,7 +1908,7 @@ from .HgRepoConfigDataDialog import HgRepoConfigDataDialog dlg = HgRepoConfigDataDialog(withLargefiles=withLargefiles, largefilesData=largefilesData) - if dlg.exec() == QDialog.Accepted: + if dlg.exec() == QDialog.DialogCode.Accepted: createContents = True defaultUrl, defaultPushUrl = dlg.getData() if withLargefiles: @@ -2072,7 +2072,7 @@ self.hgGetBranchesList(), self.hgGetBookmarksList(), version=self.version) - if dlg.exec() != QDialog.Accepted: + if dlg.exec() != QDialog.DialogCode.Accepted: return revs, baseRevs, compression, bundleAll = dlg.getParameters() @@ -2216,7 +2216,7 @@ dlg = HgRevisionSelectionDialog(self.hgGetTagsList(), self.hgGetBranchesList(), self.hgGetBookmarksList()) - if dlg.exec() == QDialog.Accepted: + if dlg.exec() == QDialog.DialogCode.Accepted: rev = dlg.getRevision() else: return @@ -2269,7 +2269,7 @@ dlg = HgBackoutDialog(self.hgGetTagsList(), self.hgGetBranchesList(), self.hgGetBookmarksList()) - if dlg.exec() == QDialog.Accepted: + if dlg.exec() == QDialog.DialogCode.Accepted: rev, merge, date, user, message = dlg.getParameters() if not rev: E5MessageBox.warning( @@ -2333,7 +2333,7 @@ """ from .HgImportDialog import HgImportDialog dlg = HgImportDialog(self) - if dlg.exec() == QDialog.Accepted: + if dlg.exec() == QDialog.DialogCode.Accepted: (patchFile, noCommit, message, date, user, withSecret, stripCount, force) = dlg.getParameters() @@ -2378,7 +2378,7 @@ from .HgExportDialog import HgExportDialog dlg = HgExportDialog(self.hgGetBookmarksList(), self.version >= (4, 7, 0)) - if dlg.exec() == QDialog.Accepted: + if dlg.exec() == QDialog.DialogCode.Accepted: (filePattern, revisions, bookmark, switchParent, allText, noDates, git) = dlg.getParameters() @@ -2418,7 +2418,7 @@ if data is None: from .HgPhaseDialog import HgPhaseDialog dlg = HgPhaseDialog() - if dlg.exec() == QDialog.Accepted: + if dlg.exec() == QDialog.DialogCode.Accepted: data = dlg.getData() if data: @@ -2459,7 +2459,7 @@ from .HgGraftDialog import HgGraftDialog res = False dlg = HgGraftDialog(self, revs) - if dlg.exec() == QDialog.Accepted: + if dlg.exec() == QDialog.DialogCode.Accepted: (revs, (userData, currentUser, userName), (dateData, currentDate, dateStr), @@ -2561,7 +2561,7 @@ """ from .HgArchiveDialog import HgArchiveDialog dlg = HgArchiveDialog(self) - if dlg.exec() == QDialog.Accepted: + if dlg.exec() == QDialog.DialogCode.Accepted: archive, type_, prefix, subrepos = dlg.getData() args = self.initCommand("archive") @@ -2626,7 +2626,7 @@ ppath = self.__projectHelper.getProject().getProjectPath() hgsub = self.getHgSubPath() dlg = HgAddSubrepositoryDialog(ppath) - if dlg.exec() == QDialog.Accepted: + if dlg.exec() == QDialog.DialogCode.Accepted: relPath, subrepoType, subrepoUrl = dlg.getData() if subrepoType == "hg": url = subrepoUrl @@ -2714,7 +2714,7 @@ HgRemoveSubrepositoriesDialog ) dlg = HgRemoveSubrepositoriesDialog(subrepositories) - if dlg.exec() == QDialog.Accepted: + if dlg.exec() == QDialog.DialogCode.Accepted: subrepositories, removedSubrepos, deleteSubrepos = dlg.getData() contents = "\n".join(subrepositories) + "\n" try: @@ -3043,7 +3043,7 @@ self.hgGetTagsList(), self.hgGetBranchesList(), self.hgGetBookmarksList()) - if dlg.exec() == QDialog.Accepted: + if dlg.exec() == QDialog.DialogCode.Accepted: revision, bookmark = dlg.getData() ok = True else: @@ -3096,7 +3096,7 @@ if not renameInfo: from .HgBookmarkRenameDialog import HgBookmarkRenameDialog dlg = HgBookmarkRenameDialog(self.hgGetBookmarksList()) - if dlg.exec() == QDialog.Accepted: + if dlg.exec() == QDialog.DialogCode.Accepted: renameInfo = dlg.getData() if renameInfo: @@ -3125,7 +3125,7 @@ self.hgGetTagsList(), self.hgGetBranchesList(), self.hgGetBookmarksList()) - if dlg.exec() == QDialog.Accepted: + if dlg.exec() == QDialog.DialogCode.Accepted: revision, bookmark = dlg.getData() ok = True else: