eric6/Plugins/VcsPlugins/vcsMercurial/HisteditExtension/HgHisteditCommitEditor.py

changeset 7836
2f0d208b8137
parent 7785
9978016560ec
child 7923
91e843545d9a
equal deleted inserted replaced
7835:0835ed67714b 7836:2f0d208b8137
49 populate the dialog. 49 populate the dialog.
50 """ 50 """
51 try: 51 try:
52 with open(self.__fileName, "r") as f: 52 with open(self.__fileName, "r") as f:
53 txt = f.read() 53 txt = f.read()
54 except (IOError, OSError) as err: 54 except OSError as err:
55 E5MessageBox.critical( 55 E5MessageBox.critical(
56 self, 56 self,
57 self.tr("Edit Commit Message"), 57 self.tr("Edit Commit Message"),
58 self.tr("""<p>The file <b>{0}</b> could not be read.</p>""" 58 self.tr("""<p>The file <b>{0}</b> could not be read.</p>"""
59 """<p>Reason: {1}</p>""").format( 59 """<p>Reason: {1}</p>""").format(
88 """ 88 """
89 msg = self.messageEdit.toPlainText() 89 msg = self.messageEdit.toPlainText()
90 try: 90 try:
91 with open(self.__fileName, "w") as f: 91 with open(self.__fileName, "w") as f:
92 f.write(msg) 92 f.write(msg)
93 except (IOError, OSError) as err: 93 except OSError as err:
94 E5MessageBox.critical( 94 E5MessageBox.critical(
95 self, 95 self,
96 self.tr("Edit Commit Message"), 96 self.tr("Edit Commit Message"),
97 self.tr("""<p>The file <b>{0}</b> could not be read.</p>""" 97 self.tr("""<p>The file <b>{0}</b> could not be read.</p>"""
98 """<p>Reason: {1}</p>""").format( 98 """<p>Reason: {1}</p>""").format(

eric ide

mercurial