38 from .HgTagDialog import HgTagDialog |
38 from .HgTagDialog import HgTagDialog |
39 from .HgTagBranchListDialog import HgTagBranchListDialog |
39 from .HgTagBranchListDialog import HgTagBranchListDialog |
40 from .HgCommandDialog import HgCommandDialog |
40 from .HgCommandDialog import HgCommandDialog |
41 from .HgBundleDialog import HgBundleDialog |
41 from .HgBundleDialog import HgBundleDialog |
42 from .HgBackoutDialog import HgBackoutDialog |
42 from .HgBackoutDialog import HgBackoutDialog |
|
43 from .HgServeDialog import HgServeDialog |
43 |
44 |
44 from .ProjectBrowserHelper import HgProjectBrowserHelper |
45 from .ProjectBrowserHelper import HgProjectBrowserHelper |
45 |
46 |
46 import Preferences |
47 import Preferences |
47 import Utilities |
48 import Utilities |
133 self.status.close() |
135 self.status.close() |
134 if self.tagbranchList is not None: |
136 if self.tagbranchList is not None: |
135 self.tagbranchList.close() |
137 self.tagbranchList.close() |
136 if self.annotate is not None: |
138 if self.annotate is not None: |
137 self.annotate.close() |
139 self.annotate.close() |
|
140 if self.serveDlg is not None: |
|
141 self.serveDlg.close() |
138 |
142 |
139 if self.bundleFile and os.path.exists(self.bundleFile): |
143 if self.bundleFile and os.path.exists(self.bundleFile): |
140 os.remove(self.bundleFile) |
144 os.remove(self.bundleFile) |
141 |
145 |
142 def vcsExists(self): |
146 def vcsExists(self): |
1973 dia = HgDialog(self.trUtf8('Backing out changeset')) |
1977 dia = HgDialog(self.trUtf8('Backing out changeset')) |
1974 res = dia.startProcess(args, repodir) |
1978 res = dia.startProcess(args, repodir) |
1975 if res: |
1979 if res: |
1976 dia.exec_() |
1980 dia.exec_() |
1977 |
1981 |
|
1982 def hgServe(self, name): |
|
1983 """ |
|
1984 Public method used to edit the repository config file. |
|
1985 |
|
1986 @param name directory name (string) |
|
1987 """ |
|
1988 dname, fname = self.splitPath(name) |
|
1989 |
|
1990 # find the root of the repo |
|
1991 repodir = str(dname) |
|
1992 while not os.path.isdir(os.path.join(repodir, self.adminDir)): |
|
1993 repodir = os.path.dirname(repodir) |
|
1994 if repodir == os.sep: |
|
1995 return |
|
1996 |
|
1997 self.serveDlg = HgServeDialog(self, repodir) |
|
1998 self.serveDlg.show() |
|
1999 |
1978 ############################################################################ |
2000 ############################################################################ |
1979 ## Methods to get the helper objects are below. |
2001 ## Methods to get the helper objects are below. |
1980 ############################################################################ |
2002 ############################################################################ |
1981 |
2003 |
1982 def vcsGetProjectBrowserHelper(self, browser, project, isTranslationsBrowser = False): |
2004 def vcsGetProjectBrowserHelper(self, browser, project, isTranslationsBrowser = False): |