--- a/eric6/Plugins/VcsPlugins/vcsMercurial/StripExtension/strip.py Tue Jan 12 17:19:02 2021 +0100 +++ b/eric6/Plugins/VcsPlugins/vcsMercurial/StripExtension/strip.py Tue Jan 12 20:03:30 2021 +0100 @@ -7,8 +7,6 @@ Module implementing the strip extension interface. """ -import os - from PyQt5.QtWidgets import QDialog from ..HgExtension import HgExtension @@ -28,29 +26,20 @@ """ super(Strip, self).__init__(vcs) - def hgStrip(self, name, rev=""): + def hgStrip(self, rev=""): """ Public method to strip revisions from a repository. - @param name file/directory name - @type str @param rev revision to strip from @type str @return flag indicating that the project should be reread @rtype bool """ - # find the root of the repo - repodir = self.vcs.splitPath(name)[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 False - from .HgStripDialog import HgStripDialog res = False - dlg = HgStripDialog(self.vcs.hgGetTagsList(repodir), - self.vcs.hgGetBranchesList(repodir), - self.vcs.hgGetBookmarksList(repodir), + dlg = HgStripDialog(self.vcs.hgGetTagsList(), + self.vcs.hgGetBranchesList(), + self.vcs.hgGetBookmarksList(), rev) if dlg.exec() == QDialog.Accepted: rev, bookmark, force, noBackup, keep = dlg.getData() @@ -71,7 +60,7 @@ dia = HgDialog( self.tr("Stripping changesets from repository"), self.vcs) - res = dia.startProcess(args, repodir) + res = dia.startProcess(args) if res: dia.exec() res = dia.hasAddOrDelete()