Plugins/VcsPlugins/vcsMercurial/ProjectHelper.py

changeset 191
dccb19a7c52e
parent 189
17bb2db7a347
child 195
2debcfe0e291
--- a/Plugins/VcsPlugins/vcsMercurial/ProjectHelper.py	Tue Apr 20 19:15:21 2010 +0000
+++ b/Plugins/VcsPlugins/vcsMercurial/ProjectHelper.py	Tue Apr 20 19:50:37 2010 +0000
@@ -554,6 +554,19 @@
         ))
         self.connect(self.hgRecoverAct, SIGNAL('triggered()'), self.__hgRecover)
         self.actions.append(self.hgRecoverAct)
+        
+        self.hgCreateIgnoreAct = E5Action(self.trUtf8('Create .hgignore'),
+                self.trUtf8('Create .hgignore'),
+                0, 0, self, 'mercurial_create ignore')
+        self.hgCreateIgnoreAct.setStatusTip(self.trUtf8(
+            'Create a .hgignore file with default values'
+        ))
+        self.hgCreateIgnoreAct.setWhatsThis(self.trUtf8(
+            """<b>Create .hgignore</b>"""
+            """<p>This creates a .hgignore file with default values.</p>"""
+        ))
+        self.connect(self.hgCreateIgnoreAct, SIGNAL('triggered()'), self.__hgCreateIgnore)
+        self.actions.append(self.hgCreateIgnoreAct)
     
     def initMenu(self, menu):
         """
@@ -569,6 +582,8 @@
         adminMenu.addAction(self.hgShowConfigAct)
         adminMenu.addAction(self.hgRepoConfigAct)
         adminMenu.addSeparator()
+        adminMenu.addAction(self.hgCreateIgnoreAct)
+        adminMenu.addSeparator()
         adminMenu.addAction(self.hgRecoverAct)
         adminMenu.addSeparator()
         adminMenu.addAction(self.hgVerifyAct)
@@ -760,3 +775,9 @@
         Protected slot used to recover from an interrupted transaction.
         """
         self.vcs.hgRecover(self.project.ppath)
+    
+    def __hgCreateIgnore(self):
+        """
+        Protected slot used to create a .hgignore file for the project.
+        """
+        self.vcs.hgCreateIgnoreFile(self.project.ppath, autoAdd = True)

eric ide

mercurial