src/eric7/Plugins/VcsPlugins/vcsGit/git.py

branch
eric7
changeset 9620
9563c83ce83d
parent 9617
6a32a62e55e7
child 9624
b47dfa7a137d
--- a/src/eric7/Plugins/VcsPlugins/vcsGit/git.py	Wed Dec 14 15:52:39 2022 +0100
+++ b/src/eric7/Plugins/VcsPlugins/vcsGit/git.py	Thu Dec 15 17:15:09 2022 +0100
@@ -93,6 +93,7 @@
         self.bisectReplayEditor = None
         self.patchStatisticsDialog = None
         self.submoduleStatusDialog = None
+        self.worktreeDialog = None
 
         self.__lastBundlePath = None
         self.__lastReplayPath = None
@@ -152,6 +153,8 @@
             self.patchStatisticsDialog.close()
         if self.submoduleStatusDialog is not None:
             self.submoduleStatusDialog.close()
+        if self.worktreeDialog is not None:
+            self.worktreeDialog.close()
 
         # shut down the project helpers
         if self.__projectHelper is not None:
@@ -4251,6 +4254,25 @@
                 dia.exec()
 
     ###########################################################################
+    ## Methods for worktree management are below..
+    ###########################################################################
+
+    def gitWorktreeManagement(self, projectDir):
+        """
+        Public method to show the worktree list/management dialog.
+
+        @param projectDir name of the project directory
+        @type str
+        """
+        from .GitWorktreeDialog import GitWorktreeDialog
+
+        if self.worktreeDialog is None:
+            self.worktreeDialog = GitWorktreeDialog(self)
+        self.worktreeDialog.show()
+        self.worktreeDialog.raise_()
+        self.worktreeDialog.start(projectDir)
+
+    ###########################################################################
     ## Methods to get the helper objects are below.
     ###########################################################################
 

eric ide

mercurial