10 import os |
10 import os |
11 import shutil |
11 import shutil |
12 import urllib.request, urllib.parse, urllib.error |
12 import urllib.request, urllib.parse, urllib.error |
13 |
13 |
14 from PyQt4.QtCore import QProcess, pyqtSignal, QFileInfo |
14 from PyQt4.QtCore import QProcess, pyqtSignal, QFileInfo |
15 from PyQt4.QtGui import QMessageBox, QApplication, QDialog, QInputDialog, QFileDialog |
15 from PyQt4.QtGui import QApplication, QDialog, QInputDialog, QFileDialog |
16 |
16 |
17 from E5Gui.E5Application import e5App |
17 from E5Gui.E5Application import e5App |
18 from E5Gui import E5MessageBox |
18 from E5Gui import E5MessageBox |
19 |
19 |
20 from QScintilla.MiniEditor import MiniEditor |
20 from QScintilla.MiniEditor import MiniEditor |
1731 if not ext: |
1731 if not ext: |
1732 ex = selectedFilter.split("(*")[1].split(")")[0] |
1732 ex = selectedFilter.split("(*")[1].split(")")[0] |
1733 if ex: |
1733 if ex: |
1734 fname += ex |
1734 fname += ex |
1735 if QFileInfo(fname).exists(): |
1735 if QFileInfo(fname).exists(): |
1736 res = E5MessageBox.warning(self.__ui, |
1736 res = E5MessageBox.yesNo(self.__ui, |
1737 self.trUtf8("Create changegroup"), |
1737 self.trUtf8("Create changegroup"), |
1738 self.trUtf8("<p>The Mercurial changegroup file <b>{0}</b> " |
1738 self.trUtf8("<p>The Mercurial changegroup file <b>{0}</b> " |
1739 "already exists.</p>") |
1739 "already exists. Overwrite it?</p>") |
1740 .format(fname), |
1740 .format(fname), |
1741 QMessageBox.StandardButtons(\ |
1741 type_ = E5MessageBox.Warning) |
1742 QMessageBox.Abort | \ |
1742 if not res: |
1743 QMessageBox.Save), |
|
1744 QMessageBox.Abort) |
|
1745 if res != QMessageBox.Save: |
|
1746 return |
1743 return |
1747 fname = Utilities.toNativeSeparators(fname) |
1744 fname = Utilities.toNativeSeparators(fname) |
1748 |
1745 |
1749 args = [] |
1746 args = [] |
1750 args.append('bundle') |
1747 args.append('bundle') |