--- a/Plugins/VcsPlugins/vcsMercurial/StripExtension/strip.py Mon Oct 24 19:55:05 2016 +0200 +++ b/Plugins/VcsPlugins/vcsMercurial/StripExtension/strip.py Tue Oct 25 19:33:11 2016 +0200 @@ -17,7 +17,6 @@ from ..HgDialog import HgDialog -# TODO: add strip support to the log browser class Strip(HgExtension): """ Class implementing the strip extension interface. @@ -27,15 +26,20 @@ Constructor @param vcs reference to the Mercurial vcs object + @type Hg """ super(Strip, self).__init__(vcs) - def hgStrip(self, name): + def hgStrip(self, name, rev=""): """ Public method to strip revisions from a repository. - @param name file/directory name (string) - @return flag indicating that the project should be reread (boolean) + @param name file/directory name + @type str + @keyparam 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] @@ -48,7 +52,8 @@ res = False dlg = HgStripDialog(self.vcs.hgGetTagsList(repodir), self.vcs.hgGetBranchesList(repodir), - self.vcs.hgGetBookmarksList(repodir)) + self.vcs.hgGetBookmarksList(repodir), + rev) if dlg.exec_() == QDialog.Accepted: rev, bookmark, force, noBackup, keep = dlg.getData()