src/eric7/Plugins/VcsPlugins/vcsMercurial/StripExtension/strip.py

branch
eric7
changeset 11006
a671918232f3
parent 10439
21c28b0f9e41
--- a/src/eric7/Plugins/VcsPlugins/vcsMercurial/StripExtension/strip.py	Fri Oct 25 09:47:48 2024 +0200
+++ b/src/eric7/Plugins/VcsPlugins/vcsMercurial/StripExtension/strip.py	Fri Oct 25 17:58:59 2024 +0200
@@ -18,14 +18,16 @@
     Class implementing the strip extension interface.
     """
 
-    def __init__(self, vcs):
+    def __init__(self, vcs, ui=None):
         """
         Constructor
 
         @param vcs reference to the Mercurial vcs object
         @type Hg
+        @param ui reference to a UI widget (defaults to None)
+        @type QWidget
         """
-        super().__init__(vcs)
+        super().__init__(vcs, ui=ui)
 
     def hgStrip(self, rev=""):
         """
@@ -44,6 +46,7 @@
             self.vcs.hgGetBranchesList(),
             self.vcs.hgGetBookmarksList(),
             rev,
+            parent=self.ui,
         )
         if dlg.exec() == QDialog.DialogCode.Accepted:
             rev, bookmark, force, noBackup, keep = dlg.getData()
@@ -61,7 +64,11 @@
             args.append("-v")
             args.append(rev)
 
-            dia = HgDialog(self.tr("Stripping changesets from repository"), self.vcs)
+            dia = HgDialog(
+                self.tr("Stripping changesets from repository"),
+                hg=self.vcs,
+                parent=self.ui,
+            )
             res = dia.startProcess(args)
             if res:
                 dia.exec()

eric ide

mercurial