eric6/Plugins/VcsPlugins/vcsMercurial/CloseheadExtension/closehead.py

changeset 7970
c4ee8a81584c
parent 7923
91e843545d9a
child 8143
2c730d5fd177
diff -r 62eff8b34a8d -r c4ee8a81584c eric6/Plugins/VcsPlugins/vcsMercurial/CloseheadExtension/closehead.py
--- a/eric6/Plugins/VcsPlugins/vcsMercurial/CloseheadExtension/closehead.py	Tue Jan 12 17:19:02 2021 +0100
+++ b/eric6/Plugins/VcsPlugins/vcsMercurial/CloseheadExtension/closehead.py	Tue Jan 12 20:03:30 2021 +0100
@@ -7,8 +7,6 @@
 Module implementing the closehead extension interface.
 """
 
-import os
-
 from PyQt5.QtWidgets import QDialog
 
 from ..HgExtension import HgExtension
@@ -28,26 +26,17 @@
         """
         super(Closehead, self).__init__(vcs)
     
-    def hgCloseheads(self, name, revisions=None):
+    def hgCloseheads(self, revisions=None):
         """
         Public method to close arbitrary heads.
         
-        @param name file/directory name
-        @type str
         @param revisions revisions of branch heads to be closed
         @type str
         """
-        # 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
-        
         message = ""
         if not revisions:
             from .HgCloseHeadSelectionDialog import HgCloseHeadSelectionDialog
-            dlg = HgCloseHeadSelectionDialog(self.vcs, name)
+            dlg = HgCloseHeadSelectionDialog(self.vcs)
             if dlg.exec() == QDialog.Accepted:
                 revisions, message = dlg.getData()
         
@@ -68,6 +57,6 @@
             args += ["--rev", revision]
         
         dia = HgDialog(self.tr("Closing Heads"), self.vcs)
-        res = dia.startProcess(args, repodir)
+        res = dia.startProcess(args)
         if res:
             dia.exec()

eric ide

mercurial