diff -r c4ee8a81584c -r ff2971513d6d eric6/Plugins/VcsPlugins/vcsMercurial/HisteditExtension/histedit.py --- a/eric6/Plugins/VcsPlugins/vcsMercurial/HisteditExtension/histedit.py Tue Jan 12 20:03:30 2021 +0100 +++ b/eric6/Plugins/VcsPlugins/vcsMercurial/HisteditExtension/histedit.py Wed Jan 13 17:46:13 2021 +0100 @@ -29,24 +29,15 @@ """ super(Histedit, self).__init__(vcs) - def hgHisteditStart(self, name, rev=""): + def hgHisteditStart(self, rev=""): """ Public method to start a histedit session. - @param name file/directory name - @type str @param rev revision to start histedit at @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 .HgHisteditConfigDialog import HgHisteditConfigDialog res = False dlg = HgHisteditConfigDialog(self.vcs.hgGetTagsList(), @@ -76,29 +67,20 @@ self.tr("Starting histedit session"), self.vcs, useClient=False) - res = dia.startProcess(args, repodir, environment=env) + res = dia.startProcess(args, environment=env) if res: dia.exec() res = dia.hasAddOrDelete() self.vcs.checkVCSStatus() return res - def hgHisteditContinue(self, name): + def hgHisteditContinue(self): """ Public method to continue an interrupted histedit session. - @param name file/directory name - @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 - args = self.vcs.initCommand("histedit") args.append("--continue") args.append("-v") @@ -111,7 +93,7 @@ self.tr("Continue histedit session"), self.vcs, useClient=False) - res = dia.startProcess(args, repodir, environment=env) + res = dia.startProcess(args, environment=env) if res: dia.exec() res = dia.hasAddOrDelete() @@ -127,13 +109,6 @@ @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 - args = self.vcs.initCommand("histedit") args.append("--abort") args.append("-v") @@ -146,30 +121,21 @@ self.tr("Abort histedit session"), self.vcs, useClient=False) - res = dia.startProcess(args, repodir, environment=env) + res = dia.startProcess(args, environment=env) if res: dia.exec() res = dia.hasAddOrDelete() self.vcs.checkVCSStatus() return res - def hgHisteditEditPlan(self, name): + def hgHisteditEditPlan(self): """ Public method to edit the remaining actions list of an interrupted histedit session. - @param name file/directory name - @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 - args = self.vcs.initCommand("histedit") args.append("--edit-plan") args.append("-v") @@ -182,7 +148,7 @@ self.tr("Edit Plan"), self.vcs, useClient=False) - res = dia.startProcess(args, repodir, environment=env) + res = dia.startProcess(args, environment=env) if res: dia.exec() res = dia.hasAddOrDelete()