diff -r 866adc8c315b -r 0acf98cd089a eric6/Plugins/VcsPlugins/vcsMercurial/StripExtension/strip.py --- a/eric6/Plugins/VcsPlugins/vcsMercurial/StripExtension/strip.py Sun Jan 17 13:53:08 2021 +0100 +++ b/eric6/Plugins/VcsPlugins/vcsMercurial/StripExtension/strip.py Mon Feb 01 10:38:16 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 - @keyparam rev revision to strip from + @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()