Plugins/VcsPlugins/vcsMercurial/ConfigurationPage/MercurialPage.py

changeset 2278
72d794b6fef8
parent 1509
c0b5e693b0eb
child 2302
f29e9405c851
equal deleted inserted replaced
2276:52ec544a6c74 2278:72d794b6fef8
4 # 4 #
5 5
6 """ 6 """
7 Module implementing the Mercurial configuration page. 7 Module implementing the Mercurial configuration page.
8 """ 8 """
9
10 import os
9 11
10 from PyQt4.QtCore import pyqtSlot 12 from PyQt4.QtCore import pyqtSlot
11 13
12 from QScintilla.MiniEditor import MiniEditor 14 from QScintilla.MiniEditor import MiniEditor
13 15
58 def on_configButton_clicked(self): 60 def on_configButton_clicked(self):
59 """ 61 """
60 Private slot to edit the (per user) Mercurial configuration file. 62 Private slot to edit the (per user) Mercurial configuration file.
61 """ 63 """
62 cfgFile = self.__plugin.getConfigPath() 64 cfgFile = self.__plugin.getConfigPath()
65 if not os.path.exists(cfgFile):
66 try:
67 f = open(cfgFile, "w")
68 f.close()
69 except (IOError, OSError):
70 # ignore these
71 pass
63 editor = MiniEditor(cfgFile, "Properties", self) 72 editor = MiniEditor(cfgFile, "Properties", self)
64 editor.show() 73 editor.show()

eric ide

mercurial