Plugins/VcsPlugins/vcsMercurial/hg.py

changeset 305
5cf9e308f342
parent 276
4a7e25ee406c
child 347
0b1a7a38f8e9
diff -r 98429932e0c9 -r 5cf9e308f342 Plugins/VcsPlugins/vcsMercurial/hg.py
--- a/Plugins/VcsPlugins/vcsMercurial/hg.py	Sat May 29 15:26:00 2010 +0200
+++ b/Plugins/VcsPlugins/vcsMercurial/hg.py	Sat May 29 17:52:59 2010 +0200
@@ -40,6 +40,7 @@
 from .HgCommandDialog import HgCommandDialog
 from .HgBundleDialog import HgBundleDialog
 from .HgBackoutDialog import HgBackoutDialog
+from .HgServeDialog import HgServeDialog
 
 from .ProjectBrowserHelper import HgProjectBrowserHelper
 
@@ -104,6 +105,7 @@
         self.tagbranchList = None
         self.annotate = None
         self.editor = None
+        self.serveDlg = None
         self.bundleFile = None
         
         self.statusCache = {}
@@ -135,6 +137,8 @@
             self.tagbranchList.close()
         if self.annotate is not None:
             self.annotate.close()
+        if self.serveDlg is not None:
+            self.serveDlg.close()
         
         if self.bundleFile and os.path.exists(self.bundleFile):
             os.remove(self.bundleFile)
@@ -1975,6 +1979,24 @@
             if res:
                 dia.exec_()
     
+    def hgServe(self, name):
+        """
+        Public method used to edit the repository config file.
+        
+        @param name directory name (string)
+        """
+        dname, fname = self.splitPath(name)
+        
+        # find the root of the repo
+        repodir = str(dname)
+        while not os.path.isdir(os.path.join(repodir, self.adminDir)):
+            repodir = os.path.dirname(repodir)
+            if repodir == os.sep:
+                return
+        
+        self.serveDlg = HgServeDialog(self, repodir)
+        self.serveDlg.show()
+    
     ############################################################################
     ## Methods to get the helper objects are below.
     ############################################################################

eric ide

mercurial