Plugins/VcsPlugins/vcsMercurial/hg.py

changeset 1064
10bdbb173c0f
parent 1061
3e21869872e3
child 1066
a3dd41fd9ea8
equal deleted inserted replaced
1063:a0afd409c566 1064:10bdbb173c0f
113 self.logBrowser = None 113 self.logBrowser = None
114 self.diff = None 114 self.diff = None
115 self.status = None 115 self.status = None
116 self.tagbranchList = None 116 self.tagbranchList = None
117 self.annotate = None 117 self.annotate = None
118 self.editor = None 118 self.repoEditor = None
119 self.userEditor = None
119 self.serveDlg = None 120 self.serveDlg = None
121
120 self.bundleFile = None 122 self.bundleFile = None
121 123
122 self.statusCache = {} 124 self.statusCache = {}
123 125
124 self.__commitData = {} 126 self.__commitData = {}
162 self.tagbranchList.close() 164 self.tagbranchList.close()
163 if self.annotate is not None: 165 if self.annotate is not None:
164 self.annotate.close() 166 self.annotate.close()
165 if self.serveDlg is not None: 167 if self.serveDlg is not None:
166 self.serveDlg.close() 168 self.serveDlg.close()
169 if self.repoEditor is not None:
170 self.repoEditor.close()
171 if self.userEditor is not None:
172 self.userEditor.close()
167 173
168 if self.bundleFile and os.path.exists(self.bundleFile): 174 if self.bundleFile and os.path.exists(self.bundleFile):
169 os.remove(self.bundleFile) 175 os.remove(self.bundleFile)
170 176
171 # shut down the extensions 177 # shut down the extensions
1657 dia = HgDialog(self.trUtf8('Showing current branch')) 1663 dia = HgDialog(self.trUtf8('Showing current branch'))
1658 res = dia.startProcess(args, repodir, False) 1664 res = dia.startProcess(args, repodir, False)
1659 if res: 1665 if res:
1660 dia.exec_() 1666 dia.exec_()
1661 1667
1668 def hgEditUserConfig(self):
1669 """
1670 Public method used to edit the user configuration file.
1671 """
1672 cfgFile = getConfigPath()
1673 self.userEditor = MiniEditor(cfgFile, "Properties")
1674 self.userEditor.show()
1675
1662 def hgEditConfig(self, name): 1676 def hgEditConfig(self, name):
1663 """ 1677 """
1664 Public method used to edit the repository config file. 1678 Public method used to edit the repository configuration file.
1665 1679
1666 @param name file/directory name (string) 1680 @param name file/directory name (string)
1667 """ 1681 """
1668 dname, fname = self.splitPath(name) 1682 dname, fname = self.splitPath(name)
1669 1683
1679 try: 1693 try:
1680 cfg = open(cfgFile, "w") 1694 cfg = open(cfgFile, "w")
1681 cfg.close() 1695 cfg.close()
1682 except IOError: 1696 except IOError:
1683 pass 1697 pass
1684 self.editor = MiniEditor(cfgFile, "Properties") 1698 self.repoEditor = MiniEditor(cfgFile, "Properties")
1685 self.editor.show() 1699 self.repoEditor.show()
1686 1700
1687 def hgVerify(self, name): 1701 def hgVerify(self, name):
1688 """ 1702 """
1689 Public method to verify the integrity of the repository. 1703 Public method to verify the integrity of the repository.
1690 1704
1707 if res: 1721 if res:
1708 dia.exec_() 1722 dia.exec_()
1709 1723
1710 def hgShowConfig(self, name): 1724 def hgShowConfig(self, name):
1711 """ 1725 """
1712 Public method to show the combined config. 1726 Public method to show the combined configuration.
1713 1727
1714 @param name file/directory name (string) 1728 @param name file/directory name (string)
1715 """ 1729 """
1716 dname, fname = self.splitPath(name) 1730 dname, fname = self.splitPath(name)
1717 1731
2175 if res: 2189 if res:
2176 dia.exec_() 2190 dia.exec_()
2177 2191
2178 def hgServe(self, name): 2192 def hgServe(self, name):
2179 """ 2193 """
2180 Public method used to edit the repository config file. 2194 Public method used to serve the project.
2181 2195
2182 @param name directory name (string) 2196 @param name directory name (string)
2183 """ 2197 """
2184 dname, fname = self.splitPath(name) 2198 dname, fname = self.splitPath(name)
2185 2199
2197 ## Methods to handle extensions are below. 2211 ## Methods to handle extensions are below.
2198 ############################################################################ 2212 ############################################################################
2199 2213
2200 def __iniFileChanged(self, path): 2214 def __iniFileChanged(self, path):
2201 """ 2215 """
2202 Private slot to handle a change of the Mercurial config file. 2216 Private slot to handle a change of the Mercurial configuration file.
2203 2217
2204 @param path name of the changed file (string) 2218 @param path name of the changed file (string)
2205 """ 2219 """
2206 self.__getExtensionsInfo() 2220 self.__getExtensionsInfo()
2207 2221
2208 def __monitorRepoIniFile(self, name): 2222 def __monitorRepoIniFile(self, name):
2209 """ 2223 """
2210 Private slot to add a repository config file to the list of monitored files. 2224 Private slot to add a repository configuration file to the list of monitored
2225 files.
2211 2226
2212 @param name directory name pointing into the repository (string) 2227 @param name directory name pointing into the repository (string)
2213 """ 2228 """
2214 dname, fname = self.splitPath(name) 2229 dname, fname = self.splitPath(name)
2215 2230

eric ide

mercurial