13 import contextlib |
13 import contextlib |
14 |
14 |
15 from PyQt6.QtCore import QProcess, pyqtSignal, QFileInfo |
15 from PyQt6.QtCore import QProcess, pyqtSignal, QFileInfo |
16 from PyQt6.QtWidgets import QApplication, QDialog, QInputDialog, QLineEdit |
16 from PyQt6.QtWidgets import QApplication, QDialog, QInputDialog, QLineEdit |
17 |
17 |
18 from E5Gui.E5Application import e5App |
18 from E5Gui.EricApplication import ericApp |
19 from E5Gui import E5MessageBox, E5FileDialog |
19 from E5Gui import EricMessageBox, EricFileDialog |
20 |
20 |
21 from QScintilla.MiniEditor import MiniEditor |
21 from QScintilla.MiniEditor import MiniEditor |
22 |
22 |
23 from VCS.VersionControl import VersionControl |
23 from VCS.VersionControl import VersionControl |
24 from VCS.RepositoryInfoDialog import VcsRepositoryInfoDialog |
24 from VCS.RepositoryInfoDialog import VcsRepositoryInfoDialog |
240 @param addAll flag indicating to add all files to the repository |
240 @param addAll flag indicating to add all files to the repository |
241 @type bool |
241 @type bool |
242 """ |
242 """ |
243 success = self.vcsImport(vcsDataDict, project.ppath, addAll=addAll)[0] |
243 success = self.vcsImport(vcsDataDict, project.ppath, addAll=addAll)[0] |
244 if not success: |
244 if not success: |
245 E5MessageBox.critical( |
245 EricMessageBox.critical( |
246 self.__ui, |
246 self.__ui, |
247 self.tr("Create project repository"), |
247 self.tr("Create project repository"), |
248 self.tr( |
248 self.tr( |
249 """The project repository could not be created.""")) |
249 """The project repository could not be created.""")) |
250 else: |
250 else: |
403 nameList = [name] |
403 nameList = [name] |
404 ok = True |
404 ok = True |
405 for nam in nameList: |
405 for nam in nameList: |
406 # check for commit of the project |
406 # check for commit of the project |
407 if os.path.isdir(nam): |
407 if os.path.isdir(nam): |
408 project = e5App().getObject("Project") |
408 project = ericApp().getObject("Project") |
409 if nam == project.getProjectPath(): |
409 if nam == project.getProjectPath(): |
410 ok &= ( |
410 ok &= ( |
411 project.checkAllScriptsDirty( |
411 project.checkAllScriptsDirty( |
412 reportSyntaxErrors=True) and |
412 reportSyntaxErrors=True) and |
413 project.checkDirty() |
413 project.checkDirty() |
414 ) |
414 ) |
415 continue |
415 continue |
416 elif os.path.isfile(nam): |
416 elif os.path.isfile(nam): |
417 editor = ( |
417 editor = ( |
418 e5App().getObject("ViewManager").getOpenEditor(nam) |
418 ericApp().getObject("ViewManager").getOpenEditor(nam) |
419 ) |
419 ) |
420 if editor: |
420 if editor: |
421 ok &= editor.checkDirty() |
421 ok &= editor.checkDirty() |
422 if not ok: |
422 if not ok: |
423 break |
423 break |
424 |
424 |
425 if not ok: |
425 if not ok: |
426 res = E5MessageBox.yesNo( |
426 res = EricMessageBox.yesNo( |
427 self.__ui, |
427 self.__ui, |
428 self.tr("Commit Changes"), |
428 self.tr("Commit Changes"), |
429 self.tr( |
429 self.tr( |
430 """The commit affects files, that have unsaved""" |
430 """The commit affects files, that have unsaved""" |
431 """ changes. Shall the commit be continued?"""), |
431 """ changes. Shall the commit be continued?"""), |
432 icon=E5MessageBox.Warning) |
432 icon=EricMessageBox.Warning) |
433 if not res: |
433 if not res: |
434 return |
434 return |
435 |
435 |
436 if self.__commitDialog is not None: |
436 if self.__commitDialog is not None: |
437 msg = self.__commitDialog.logMessage() |
437 msg = self.__commitDialog.logMessage() |
774 @param name file/directory name to be diffed (string) |
774 @param name file/directory name to be diffed (string) |
775 """ |
775 """ |
776 names = name[:] if isinstance(name, list) else [name] |
776 names = name[:] if isinstance(name, list) else [name] |
777 for nam in names: |
777 for nam in names: |
778 if os.path.isfile(nam): |
778 if os.path.isfile(nam): |
779 editor = e5App().getObject("ViewManager").getOpenEditor(nam) |
779 editor = ericApp().getObject("ViewManager").getOpenEditor(nam) |
780 if editor and not editor.checkDirty(): |
780 if editor and not editor.checkDirty(): |
781 return |
781 return |
782 else: |
782 else: |
783 project = e5App().getObject("Project") |
783 project = ericApp().getObject("Project") |
784 if nam == project.ppath and not project.saveAllScripts(): |
784 if nam == project.ppath and not project.saveAllScripts(): |
785 return |
785 return |
786 if self.diff is None: |
786 if self.diff is None: |
787 from .GitDiffDialog import GitDiffDialog |
787 from .GitDiffDialog import GitDiffDialog |
788 self.diff = GitDiffDialog(self) |
788 self.diff = GitDiffDialog(self) |
869 while not os.path.isdir(os.path.join(repodir, self.adminDir)): |
869 while not os.path.isdir(os.path.join(repodir, self.adminDir)): |
870 repodir = os.path.dirname(repodir) |
870 repodir = os.path.dirname(repodir) |
871 if os.path.splitdrive(repodir)[1] == os.sep: |
871 if os.path.splitdrive(repodir)[1] == os.sep: |
872 return False |
872 return False |
873 |
873 |
874 project = e5App().getObject("Project") |
874 project = ericApp().getObject("Project") |
875 names = [project.getRelativePath(nam) for nam in names] |
875 names = [project.getRelativePath(nam) for nam in names] |
876 if names[0]: |
876 if names[0]: |
877 from UI.DeleteFilesConfirmationDialog import ( |
877 from UI.DeleteFilesConfirmationDialog import ( |
878 DeleteFilesConfirmationDialog |
878 DeleteFilesConfirmationDialog |
879 ) |
879 ) |
884 "Do you really want to revert all changes to these files" |
884 "Do you really want to revert all changes to these files" |
885 " or directories?"), |
885 " or directories?"), |
886 names) |
886 names) |
887 yes = dlg.exec() == QDialog.DialogCode.Accepted |
887 yes = dlg.exec() == QDialog.DialogCode.Accepted |
888 else: |
888 else: |
889 yes = E5MessageBox.yesNo( |
889 yes = EricMessageBox.yesNo( |
890 None, |
890 None, |
891 self.tr("Revert changes"), |
891 self.tr("Revert changes"), |
892 self.tr("""Do you really want to revert all changes of""" |
892 self.tr("""Do you really want to revert all changes of""" |
893 """ the project?""")) |
893 """ the project?""")) |
894 if yes: |
894 if yes: |
1383 "*.DS_Store", |
1383 "*.DS_Store", |
1384 ] |
1384 ] |
1385 |
1385 |
1386 ignoreName = os.path.join(name, Git.IgnoreFileName) |
1386 ignoreName = os.path.join(name, Git.IgnoreFileName) |
1387 res = ( |
1387 res = ( |
1388 E5MessageBox.yesNo( |
1388 EricMessageBox.yesNo( |
1389 self.__ui, |
1389 self.__ui, |
1390 self.tr("Create {0} file").format(ignoreName), |
1390 self.tr("Create {0} file").format(ignoreName), |
1391 self.tr("""<p>The file <b>{0}</b> exists already.""" |
1391 self.tr("""<p>The file <b>{0}</b> exists already.""" |
1392 """ Overwrite it?</p>""").format(ignoreName), |
1392 """ Overwrite it?</p>""").format(ignoreName), |
1393 icon=E5MessageBox.Warning) |
1393 icon=EricMessageBox.Warning) |
1394 if os.path.exists(ignoreName) else |
1394 if os.path.exists(ignoreName) else |
1395 True |
1395 True |
1396 ) |
1396 ) |
1397 if res: |
1397 if res: |
1398 try: |
1398 try: |
1427 # step 1: copy the file/directory: |
1427 # step 1: copy the file/directory: |
1428 if os.path.isdir(name): |
1428 if os.path.isdir(name): |
1429 try: |
1429 try: |
1430 shutil.copytree(name, target) |
1430 shutil.copytree(name, target) |
1431 except (OSError, shutil.Error) as why: |
1431 except (OSError, shutil.Error) as why: |
1432 E5MessageBox.critical( |
1432 EricMessageBox.critical( |
1433 self, |
1433 self, |
1434 self.tr("Git Copy"), |
1434 self.tr("Git Copy"), |
1435 self.tr("""<p>Copying the directory <b>{0}</b>""" |
1435 self.tr("""<p>Copying the directory <b>{0}</b>""" |
1436 """ failed.</p><p>Reason: {1}</p>""").format( |
1436 """ failed.</p><p>Reason: {1}</p>""").format( |
1437 name, str(why))) |
1437 name, str(why))) |
1442 |
1442 |
1443 else: |
1443 else: |
1444 try: |
1444 try: |
1445 shutil.copy2(name, target) |
1445 shutil.copy2(name, target) |
1446 except (OSError, shutil.Error) as why: |
1446 except (OSError, shutil.Error) as why: |
1447 E5MessageBox.critical( |
1447 EricMessageBox.critical( |
1448 self, |
1448 self, |
1449 self.tr("Git Copy"), |
1449 self.tr("Git Copy"), |
1450 self.tr("""<p>Copying the file <b>{0}</b>""" |
1450 self.tr("""<p>Copying the file <b>{0}</b>""" |
1451 """ failed.</p><p>Reason: {1}</p>""").format( |
1451 """ failed.</p><p>Reason: {1}</p>""").format( |
1452 name, str(why))) |
1452 name, str(why))) |
1490 else: |
1490 else: |
1491 dname, fname = self.splitPath(name) |
1491 dname, fname = self.splitPath(name) |
1492 names = [name] |
1492 names = [name] |
1493 for nam in names: |
1493 for nam in names: |
1494 if os.path.isfile(nam): |
1494 if os.path.isfile(nam): |
1495 editor = e5App().getObject("ViewManager").getOpenEditor(nam) |
1495 editor = ericApp().getObject("ViewManager").getOpenEditor(nam) |
1496 if editor and not editor.checkDirty(): |
1496 if editor and not editor.checkDirty(): |
1497 return |
1497 return |
1498 else: |
1498 else: |
1499 project = e5App().getObject("Project") |
1499 project = ericApp().getObject("Project") |
1500 if nam == project.ppath and not project.saveAllScripts(): |
1500 if nam == project.ppath and not project.saveAllScripts(): |
1501 return |
1501 return |
1502 |
1502 |
1503 # find the root of the repo |
1503 # find the root of the repo |
1504 repodir = dname |
1504 repodir = dname |
2247 repodir = os.path.dirname(repodir) |
2247 repodir = os.path.dirname(repodir) |
2248 if os.path.splitdrive(repodir)[1] == os.sep: |
2248 if os.path.splitdrive(repodir)[1] == os.sep: |
2249 return |
2249 return |
2250 |
2250 |
2251 branchName = self.gitGetCurrentBranch(repodir) |
2251 branchName = self.gitGetCurrentBranch(repodir) |
2252 E5MessageBox.information( |
2252 EricMessageBox.information( |
2253 None, |
2253 None, |
2254 self.tr("Current Branch"), |
2254 self.tr("Current Branch"), |
2255 self.tr("""<p>The current branch is <b>{0}</b>.""" |
2255 self.tr("""<p>The current branch is <b>{0}</b>.""" |
2256 """</p>""").format(branchName)) |
2256 """</p>""").format(branchName)) |
2257 |
2257 |
2276 dlg = GitBundleDialog(self.gitGetTagsList(repodir), |
2276 dlg = GitBundleDialog(self.gitGetTagsList(repodir), |
2277 self.gitGetBranchesList(repodir)) |
2277 self.gitGetBranchesList(repodir)) |
2278 if dlg.exec() == QDialog.DialogCode.Accepted: |
2278 if dlg.exec() == QDialog.DialogCode.Accepted: |
2279 revs = dlg.getData() |
2279 revs = dlg.getData() |
2280 |
2280 |
2281 fname, selectedFilter = E5FileDialog.getSaveFileNameAndFilter( |
2281 fname, selectedFilter = EricFileDialog.getSaveFileNameAndFilter( |
2282 None, |
2282 None, |
2283 self.tr("Create Bundle"), |
2283 self.tr("Create Bundle"), |
2284 self.__lastBundlePath or repodir, |
2284 self.__lastBundlePath or repodir, |
2285 self.tr("Git Bundle Files (*.bundle)"), |
2285 self.tr("Git Bundle Files (*.bundle)"), |
2286 None, |
2286 None, |
2287 E5FileDialog.DontConfirmOverwrite) |
2287 EricFileDialog.DontConfirmOverwrite) |
2288 |
2288 |
2289 if not fname: |
2289 if not fname: |
2290 return # user aborted |
2290 return # user aborted |
2291 |
2291 |
2292 ext = QFileInfo(fname).suffix() |
2292 ext = QFileInfo(fname).suffix() |
2293 if not ext: |
2293 if not ext: |
2294 ex = selectedFilter.split("(*")[1].split(")")[0] |
2294 ex = selectedFilter.split("(*")[1].split(")")[0] |
2295 if ex: |
2295 if ex: |
2296 fname += ex |
2296 fname += ex |
2297 if QFileInfo(fname).exists(): |
2297 if QFileInfo(fname).exists(): |
2298 res = E5MessageBox.yesNo( |
2298 res = EricMessageBox.yesNo( |
2299 self.__ui, |
2299 self.__ui, |
2300 self.tr("Create Bundle"), |
2300 self.tr("Create Bundle"), |
2301 self.tr("<p>The Git bundle file <b>{0}</b> " |
2301 self.tr("<p>The Git bundle file <b>{0}</b> " |
2302 "already exists. Overwrite it?</p>") |
2302 "already exists. Overwrite it?</p>") |
2303 .format(fname), |
2303 .format(fname), |
2304 icon=E5MessageBox.Warning) |
2304 icon=EricMessageBox.Warning) |
2305 if not res: |
2305 if not res: |
2306 return |
2306 return |
2307 fname = Utilities.toNativeSeparators(fname) |
2307 fname = Utilities.toNativeSeparators(fname) |
2308 self.__lastBundlePath = os.path.dirname(fname) |
2308 self.__lastBundlePath = os.path.dirname(fname) |
2309 |
2309 |
2329 while not os.path.isdir(os.path.join(repodir, self.adminDir)): |
2329 while not os.path.isdir(os.path.join(repodir, self.adminDir)): |
2330 repodir = os.path.dirname(repodir) |
2330 repodir = os.path.dirname(repodir) |
2331 if os.path.splitdrive(repodir)[1] == os.sep: |
2331 if os.path.splitdrive(repodir)[1] == os.sep: |
2332 return |
2332 return |
2333 |
2333 |
2334 fname = E5FileDialog.getOpenFileName( |
2334 fname = EricFileDialog.getOpenFileName( |
2335 None, |
2335 None, |
2336 self.tr("Verify Bundle"), |
2336 self.tr("Verify Bundle"), |
2337 self.__lastBundlePath or repodir, |
2337 self.__lastBundlePath or repodir, |
2338 self.tr("Git Bundle Files (*.bundle);;All Files (*)")) |
2338 self.tr("Git Bundle Files (*.bundle);;All Files (*)")) |
2339 if fname: |
2339 if fname: |
2359 while not os.path.isdir(os.path.join(repodir, self.adminDir)): |
2359 while not os.path.isdir(os.path.join(repodir, self.adminDir)): |
2360 repodir = os.path.dirname(repodir) |
2360 repodir = os.path.dirname(repodir) |
2361 if os.path.splitdrive(repodir)[1] == os.sep: |
2361 if os.path.splitdrive(repodir)[1] == os.sep: |
2362 return |
2362 return |
2363 |
2363 |
2364 fname = E5FileDialog.getOpenFileName( |
2364 fname = EricFileDialog.getOpenFileName( |
2365 None, |
2365 None, |
2366 self.tr("List Bundle Heads"), |
2366 self.tr("List Bundle Heads"), |
2367 self.__lastBundlePath or repodir, |
2367 self.__lastBundlePath or repodir, |
2368 self.tr("Git Bundle Files (*.bundle);;All Files (*)")) |
2368 self.tr("Git Bundle Files (*.bundle);;All Files (*)")) |
2369 if fname: |
2369 if fname: |
2422 while not os.path.isdir(os.path.join(repodir, self.adminDir)): |
2422 while not os.path.isdir(os.path.join(repodir, self.adminDir)): |
2423 repodir = os.path.dirname(repodir) |
2423 repodir = os.path.dirname(repodir) |
2424 if os.path.splitdrive(repodir)[1] == os.sep: |
2424 if os.path.splitdrive(repodir)[1] == os.sep: |
2425 return |
2425 return |
2426 |
2426 |
2427 fname = E5FileDialog.getOpenFileName( |
2427 fname = EricFileDialog.getOpenFileName( |
2428 None, |
2428 None, |
2429 self.tr("Apply Bundle"), |
2429 self.tr("Apply Bundle"), |
2430 self.__lastBundlePath or repodir, |
2430 self.__lastBundlePath or repodir, |
2431 self.tr("Git Bundle Files (*.bundle);;All Files (*)")) |
2431 self.tr("Git Bundle Files (*.bundle);;All Files (*)")) |
2432 if fname: |
2432 if fname: |
2470 repodir = os.path.dirname(repodir) |
2470 repodir = os.path.dirname(repodir) |
2471 if os.path.splitdrive(repodir)[1] == os.sep: |
2471 if os.path.splitdrive(repodir)[1] == os.sep: |
2472 return False |
2472 return False |
2473 |
2473 |
2474 res = False |
2474 res = False |
2475 fname = E5FileDialog.getOpenFileName( |
2475 fname = EricFileDialog.getOpenFileName( |
2476 None, |
2476 None, |
2477 self.tr("Apply Bundle"), |
2477 self.tr("Apply Bundle"), |
2478 self.__lastBundlePath or repodir, |
2478 self.__lastBundlePath or repodir, |
2479 self.tr("Git Bundle Files (*.bundle);;All Files (*)")) |
2479 self.tr("Git Bundle Files (*.bundle);;All Files (*)")) |
2480 if fname: |
2480 if fname: |
2617 if finished and process.exitCode() == 0: |
2617 if finished and process.exitCode() == 0: |
2618 output = str(process.readAllStandardOutput(), |
2618 output = str(process.readAllStandardOutput(), |
2619 Preferences.getSystem("IOEncoding"), |
2619 Preferences.getSystem("IOEncoding"), |
2620 'replace') |
2620 'replace') |
2621 else: |
2621 else: |
2622 E5MessageBox.critical( |
2622 EricMessageBox.critical( |
2623 self, |
2623 self, |
2624 self.tr('Process Generation Error'), |
2624 self.tr('Process Generation Error'), |
2625 self.tr( |
2625 self.tr( |
2626 'The process {0} could not be started. ' |
2626 'The process {0} could not be started. ' |
2627 'Ensure, that it is in the search path.' |
2627 'Ensure, that it is in the search path.' |
2628 ).format('git')) |
2628 ).format('git')) |
2629 return |
2629 return |
2630 |
2630 |
2631 if output: |
2631 if output: |
2632 fname, selectedFilter = E5FileDialog.getSaveFileNameAndFilter( |
2632 fname, selectedFilter = EricFileDialog.getSaveFileNameAndFilter( |
2633 None, |
2633 None, |
2634 self.tr("Create Bisect Replay File"), |
2634 self.tr("Create Bisect Replay File"), |
2635 self.__lastBundlePath or repodir, |
2635 self.__lastBundlePath or repodir, |
2636 self.tr("Git Bisect Replay Files (*.replay)"), |
2636 self.tr("Git Bisect Replay Files (*.replay)"), |
2637 None, |
2637 None, |
2638 E5FileDialog.DontConfirmOverwrite) |
2638 EricFileDialog.DontConfirmOverwrite) |
2639 |
2639 |
2640 if not fname: |
2640 if not fname: |
2641 return # user aborted |
2641 return # user aborted |
2642 |
2642 |
2643 ext = QFileInfo(fname).suffix() |
2643 ext = QFileInfo(fname).suffix() |
2644 if not ext: |
2644 if not ext: |
2645 ex = selectedFilter.split("(*")[1].split(")")[0] |
2645 ex = selectedFilter.split("(*")[1].split(")")[0] |
2646 if ex: |
2646 if ex: |
2647 fname += ex |
2647 fname += ex |
2648 if QFileInfo(fname).exists(): |
2648 if QFileInfo(fname).exists(): |
2649 res = E5MessageBox.yesNo( |
2649 res = EricMessageBox.yesNo( |
2650 self.__ui, |
2650 self.__ui, |
2651 self.tr("Create Bisect Replay File"), |
2651 self.tr("Create Bisect Replay File"), |
2652 self.tr("<p>The Git bisect replay file <b>{0}</b> " |
2652 self.tr("<p>The Git bisect replay file <b>{0}</b> " |
2653 "already exists. Overwrite it?</p>") |
2653 "already exists. Overwrite it?</p>") |
2654 .format(fname), |
2654 .format(fname), |
2655 icon=E5MessageBox.Warning) |
2655 icon=EricMessageBox.Warning) |
2656 if not res: |
2656 if not res: |
2657 return |
2657 return |
2658 fname = Utilities.toNativeSeparators(fname) |
2658 fname = Utilities.toNativeSeparators(fname) |
2659 self.__lastReplayPath = os.path.dirname(fname) |
2659 self.__lastReplayPath = os.path.dirname(fname) |
2660 |
2660 |
2661 try: |
2661 try: |
2662 with open(fname, "w") as f: |
2662 with open(fname, "w") as f: |
2663 f.write(output) |
2663 f.write(output) |
2664 except OSError as err: |
2664 except OSError as err: |
2665 E5MessageBox.critical( |
2665 EricMessageBox.critical( |
2666 self.__ui, |
2666 self.__ui, |
2667 self.tr("Create Bisect Replay File"), |
2667 self.tr("Create Bisect Replay File"), |
2668 self.tr( |
2668 self.tr( |
2669 """<p>The file <b>{0}</b> could not be written.</p>""" |
2669 """<p>The file <b>{0}</b> could not be written.</p>""" |
2670 """<p>Reason: {1}</p>""") |
2670 """<p>Reason: {1}</p>""") |
2681 while not os.path.isdir(os.path.join(repodir, self.adminDir)): |
2681 while not os.path.isdir(os.path.join(repodir, self.adminDir)): |
2682 repodir = os.path.dirname(repodir) |
2682 repodir = os.path.dirname(repodir) |
2683 if os.path.splitdrive(repodir)[1] == os.sep: |
2683 if os.path.splitdrive(repodir)[1] == os.sep: |
2684 return |
2684 return |
2685 |
2685 |
2686 fname = E5FileDialog.getOpenFileName( |
2686 fname = EricFileDialog.getOpenFileName( |
2687 None, |
2687 None, |
2688 self.tr("Edit Bisect Replay File"), |
2688 self.tr("Edit Bisect Replay File"), |
2689 self.__lastReplayPath or repodir, |
2689 self.__lastReplayPath or repodir, |
2690 self.tr("Git Bisect Replay Files (*.replay);;All Files (*)")) |
2690 self.tr("Git Bisect Replay Files (*.replay);;All Files (*)")) |
2691 if fname: |
2691 if fname: |
2708 repodir = os.path.dirname(repodir) |
2708 repodir = os.path.dirname(repodir) |
2709 if os.path.splitdrive(repodir)[1] == os.sep: |
2709 if os.path.splitdrive(repodir)[1] == os.sep: |
2710 return False |
2710 return False |
2711 |
2711 |
2712 res = False |
2712 res = False |
2713 fname = E5FileDialog.getOpenFileName( |
2713 fname = EricFileDialog.getOpenFileName( |
2714 None, |
2714 None, |
2715 self.tr("Bisect Replay"), |
2715 self.tr("Bisect Replay"), |
2716 self.__lastReplayPath or repodir, |
2716 self.__lastReplayPath or repodir, |
2717 self.tr("Git Bisect Replay Files (*.replay);;All Files (*)")) |
2717 self.tr("Git Bisect Replay Files (*.replay);;All Files (*)")) |
2718 if fname: |
2718 if fname: |
3541 while not os.path.isdir(os.path.join(repodir, self.adminDir)): |
3541 while not os.path.isdir(os.path.join(repodir, self.adminDir)): |
3542 repodir = os.path.dirname(repodir) |
3542 repodir = os.path.dirname(repodir) |
3543 if os.path.splitdrive(repodir)[1] == os.sep: |
3543 if os.path.splitdrive(repodir)[1] == os.sep: |
3544 return False |
3544 return False |
3545 |
3545 |
3546 res = E5MessageBox.yesNo( |
3546 res = EricMessageBox.yesNo( |
3547 None, |
3547 None, |
3548 self.tr("Delete All Stashes"), |
3548 self.tr("Delete All Stashes"), |
3549 self.tr("""Do you really want to delete all stashes?""")) |
3549 self.tr("""Do you really want to delete all stashes?""")) |
3550 if res: |
3550 if res: |
3551 args = self.initCommand("stash") |
3551 args = self.initCommand("stash") |
3917 if submodulesList: |
3917 if submodulesList: |
3918 from .GitSubmodulesListDialog import GitSubmodulesListDialog |
3918 from .GitSubmodulesListDialog import GitSubmodulesListDialog |
3919 dlg = GitSubmodulesListDialog(submodulesList) |
3919 dlg = GitSubmodulesListDialog(submodulesList) |
3920 dlg.exec() |
3920 dlg.exec() |
3921 else: |
3921 else: |
3922 E5MessageBox.information( |
3922 EricMessageBox.information( |
3923 None, |
3923 None, |
3924 self.tr("List Submodules"), |
3924 self.tr("List Submodules"), |
3925 self.tr("""No submodules defined for the project.""")) |
3925 self.tr("""No submodules defined for the project.""")) |
3926 |
3926 |
3927 def __selectSubmodulePath(self, repodir): |
3927 def __selectSubmodulePath(self, repodir): |