7 Module implementing the version control systems interface to Mercurial. |
7 Module implementing the version control systems interface to Mercurial. |
8 """ |
8 """ |
9 |
9 |
10 import os |
10 import os |
11 import shutil |
11 import shutil |
|
12 import contextlib |
12 |
13 |
13 from PyQt5.QtCore import ( |
14 from PyQt5.QtCore import ( |
14 pyqtSignal, QFileInfo, QFileSystemWatcher, QCoreApplication |
15 pyqtSignal, QFileInfo, QFileSystemWatcher, QCoreApplication |
15 ) |
16 ) |
16 from PyQt5.QtWidgets import QApplication, QDialog, QInputDialog |
17 from PyQt5.QtWidgets import QApplication, QDialog, QInputDialog |
1138 entries = [] |
1139 entries = [] |
1139 for pat in patterns: |
1140 for pat in patterns: |
1140 entries.extend(Utilities.direntries(name, True, pat)) |
1141 entries.extend(Utilities.direntries(name, True, pat)) |
1141 |
1142 |
1142 for entry in entries: |
1143 for entry in entries: |
1143 try: |
1144 with contextlib.suppress(OSError): |
1144 os.remove(entry) |
1145 os.remove(entry) |
1145 except OSError: |
|
1146 pass |
|
1147 |
1146 |
1148 def vcsCommandLine(self, name): |
1147 def vcsCommandLine(self, name): |
1149 """ |
1148 """ |
1150 Public method used to execute arbitrary mercurial commands. |
1149 Public method used to execute arbitrary mercurial commands. |
1151 |
1150 |