--- a/eric6/Plugins/VcsPlugins/vcsMercurial/GpgExtension/gpg.py Tue Jan 12 17:19:02 2021 +0100 +++ b/eric6/Plugins/VcsPlugins/vcsMercurial/GpgExtension/gpg.py Tue Jan 12 20:03:30 2021 +0100 @@ -37,36 +37,26 @@ if self.gpgSignaturesDialog is not None: self.gpgSignaturesDialog.close() - def hgGpgSignatures(self, path): + def hgGpgSignatures(self): """ Public method used to list all signed changesets. - - @param path directory name of the project (string) """ from .HgGpgSignaturesDialog import HgGpgSignaturesDialog self.gpgSignaturesDialog = HgGpgSignaturesDialog(self.vcs) self.gpgSignaturesDialog.show() - self.gpgSignaturesDialog.start(path) + self.gpgSignaturesDialog.start() - def hgGpgVerifySignatures(self, path, rev=None): + def hgGpgVerifySignatures(self, rev=None): """ Public method used to verify the signatures of a revision. - @param path directory name of the project (string) @param rev revision to check (string) """ - # find the root of the repo - repodir = self.vcs.splitPath(path)[0] - while not os.path.isdir(os.path.join(repodir, self.vcs.adminDir)): - repodir = os.path.dirname(repodir) - if os.path.splitdrive(repodir)[1] == os.sep: - return - if rev is None: dlg = HgRevisionSelectionDialog( - self.vcs.hgGetTagsList(repodir), - self.vcs.hgGetBranchesList(repodir), - self.vcs.hgGetBookmarksList(repodir)) + self.vcs.hgGetTagsList(), + self.vcs.hgGetBranchesList(), + self.vcs.hgGetBookmarksList()) if dlg.exec() == QDialog.Accepted: rev = dlg.getRevision(revset=False) @@ -77,31 +67,22 @@ args.append(rev) dia = HgDialog(self.tr('Verify Signatures'), self.vcs) - res = dia.startProcess(args, repodir) + res = dia.startProcess(args) if res: dia.exec() - def hgGpgSign(self, path, revisions=None): + def hgGpgSign(self, revisions=None): """ Public method used to list the available bookmarks. - @param path directory name of the project - @type str @param revisions list containing the revisions to be signed @type list of str """ - # find the root of the repo - repodir = self.vcs.splitPath(path)[0] - while not os.path.isdir(os.path.join(repodir, self.vcs.adminDir)): - repodir = os.path.dirname(repodir) - if os.path.splitdrive(repodir)[1] == os.sep: - return - if revisions is None: from .HgGpgSignDialog import HgGpgSignDialog - dlg = HgGpgSignDialog(self.vcs.hgGetTagsList(repodir), - self.vcs.hgGetBranchesList(repodir), - self.vcs.hgGetBookmarksList(repodir)) + dlg = HgGpgSignDialog(self.vcs.hgGetTagsList(), + self.vcs.hgGetBranchesList(), + self.vcs.hgGetBookmarksList()) if dlg.exec() == QDialog.Accepted: revision, noCommit, message, keyId, local, force = ( dlg.getData() @@ -136,6 +117,6 @@ args.append(rev) dia = HgDialog(self.tr('Sign Revision'), self.vcs) - res = dia.startProcess(args, repodir) + res = dia.startProcess(args) if res: dia.exec()