eric6/Plugins/VcsPlugins/vcsMercurial/RebaseExtension/rebase.py

Wed, 30 Dec 2020 11:00:44 +0100

author
Detlev Offenbach <detlev@die-offenbachs.de>
date
Wed, 30 Dec 2020 11:00:44 +0100
branch
maintenance
changeset 7924
8a96736d465e
parent 7780
41420f82c0ac
child 7970
c4ee8a81584c
permissions
-rw-r--r--

Updated copyright for 2021.

1093
47bc4ef30315 Added support for the Mercurial rebase extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1 # -*- coding: utf-8 -*-
47bc4ef30315 Added support for the Mercurial rebase extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
2
7924
8a96736d465e Updated copyright for 2021.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7780
diff changeset
3 # Copyright (c) 2011 - 2021 Detlev Offenbach <detlev@die-offenbachs.de>
1093
47bc4ef30315 Added support for the Mercurial rebase extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4 #
47bc4ef30315 Added support for the Mercurial rebase extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5
47bc4ef30315 Added support for the Mercurial rebase extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6 """
47bc4ef30315 Added support for the Mercurial rebase extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
7 Module implementing the rebase extension interface.
47bc4ef30315 Added support for the Mercurial rebase extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
8 """
47bc4ef30315 Added support for the Mercurial rebase extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
9
47bc4ef30315 Added support for the Mercurial rebase extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
10 import os
47bc4ef30315 Added support for the Mercurial rebase extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
11
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3562
diff changeset
12 from PyQt5.QtWidgets import QDialog
1093
47bc4ef30315 Added support for the Mercurial rebase extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
13
47bc4ef30315 Added support for the Mercurial rebase extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
14 from ..HgExtension import HgExtension
47bc4ef30315 Added support for the Mercurial rebase extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
15 from ..HgDialog import HgDialog
47bc4ef30315 Added support for the Mercurial rebase extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
16
47bc4ef30315 Added support for the Mercurial rebase extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
17
47bc4ef30315 Added support for the Mercurial rebase extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
18 class Rebase(HgExtension):
47bc4ef30315 Added support for the Mercurial rebase extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
19 """
47bc4ef30315 Added support for the Mercurial rebase extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
20 Class implementing the rebase extension interface.
47bc4ef30315 Added support for the Mercurial rebase extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
21 """
47bc4ef30315 Added support for the Mercurial rebase extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
22 def __init__(self, vcs):
47bc4ef30315 Added support for the Mercurial rebase extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
23 """
47bc4ef30315 Added support for the Mercurial rebase extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
24 Constructor
47bc4ef30315 Added support for the Mercurial rebase extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
25
47bc4ef30315 Added support for the Mercurial rebase extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
26 @param vcs reference to the Mercurial vcs object
47bc4ef30315 Added support for the Mercurial rebase extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
27 """
2525
8b507a9a2d40 Script changes: Future import added, super calls modified and unicode behavior for str.
T.Rzepka <Tobias.Rzepka@gmail.com>
parents: 2405
diff changeset
28 super(Rebase, self).__init__(vcs)
1093
47bc4ef30315 Added support for the Mercurial rebase extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
29
47bc4ef30315 Added support for the Mercurial rebase extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
30 def hgRebase(self, path):
47bc4ef30315 Added support for the Mercurial rebase extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
31 """
47bc4ef30315 Added support for the Mercurial rebase extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
32 Public method to rebase changesets to a different branch.
47bc4ef30315 Added support for the Mercurial rebase extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
33
47bc4ef30315 Added support for the Mercurial rebase extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
34 @param path directory name of the project (string)
47bc4ef30315 Added support for the Mercurial rebase extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
35 @return flag indicating that the project should be reread (boolean)
47bc4ef30315 Added support for the Mercurial rebase extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
36 """
47bc4ef30315 Added support for the Mercurial rebase extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
37 # find the root of the repo
47bc4ef30315 Added support for the Mercurial rebase extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
38 repodir = self.vcs.splitPath(path)[0]
47bc4ef30315 Added support for the Mercurial rebase extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
39 while not os.path.isdir(os.path.join(repodir, self.vcs.adminDir)):
47bc4ef30315 Added support for the Mercurial rebase extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
40 repodir = os.path.dirname(repodir)
1318
6fa303bd65d6 Fixed issues in various Mercurial files that could cause infinite loops on Windows systems.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1249
diff changeset
41 if os.path.splitdrive(repodir)[1] == os.sep:
1093
47bc4ef30315 Added support for the Mercurial rebase extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
42 return False
47bc4ef30315 Added support for the Mercurial rebase extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
43
47bc4ef30315 Added support for the Mercurial rebase extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
44 res = False
2405
d4b5f3bd4720 Continued implementing the delayed import.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2302
diff changeset
45 from .HgRebaseDialog import HgRebaseDialog
1093
47bc4ef30315 Added support for the Mercurial rebase extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
46 dlg = HgRebaseDialog(self.vcs.hgGetTagsList(repodir),
47bc4ef30315 Added support for the Mercurial rebase extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
47 self.vcs.hgGetBranchesList(repodir),
6459
68c13732795b rebase, HgRebaseDialog: add support for --confirm and --dry-run as of Mercurial 4.7.0.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6458
diff changeset
48 self.vcs.hgGetBookmarksList(repodir),
68c13732795b rebase, HgRebaseDialog: add support for --confirm and --dry-run as of Mercurial 4.7.0.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6458
diff changeset
49 self.vcs.version)
7759
51aa6c6b66f7 Changed calls to exec_() into exec() (remainder of Python2 elimination).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7360
diff changeset
50 if dlg.exec() == QDialog.Accepted:
3008
7848489bcb92 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2405
diff changeset
51 (indicator, sourceRev, destRev, collapse, keep, keepBranches,
6459
68c13732795b rebase, HgRebaseDialog: add support for --confirm and --dry-run as of Mercurial 4.7.0.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6458
diff changeset
52 detach, dryRunOnly, dryRunConfirm) = dlg.getData()
1093
47bc4ef30315 Added support for the Mercurial rebase extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
53
3302
e92f0dd51979 Removed the Mercurial support for a command options dialog and added useable global options to the Mercurial config page.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3190
diff changeset
54 args = self.vcs.initCommand("rebase")
1093
47bc4ef30315 Added support for the Mercurial rebase extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
55 if indicator == "S":
47bc4ef30315 Added support for the Mercurial rebase extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
56 args.append("--source")
47bc4ef30315 Added support for the Mercurial rebase extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
57 args.append(sourceRev)
47bc4ef30315 Added support for the Mercurial rebase extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
58 elif indicator == "B":
47bc4ef30315 Added support for the Mercurial rebase extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
59 args.append("--base")
47bc4ef30315 Added support for the Mercurial rebase extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
60 args.append(sourceRev)
47bc4ef30315 Added support for the Mercurial rebase extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
61 if destRev:
47bc4ef30315 Added support for the Mercurial rebase extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
62 args.append("--dest")
47bc4ef30315 Added support for the Mercurial rebase extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
63 args.append(destRev)
47bc4ef30315 Added support for the Mercurial rebase extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
64 if collapse:
47bc4ef30315 Added support for the Mercurial rebase extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
65 args.append("--collapse")
47bc4ef30315 Added support for the Mercurial rebase extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
66 if keep:
47bc4ef30315 Added support for the Mercurial rebase extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
67 args.append("--keep")
47bc4ef30315 Added support for the Mercurial rebase extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
68 if keepBranches:
47bc4ef30315 Added support for the Mercurial rebase extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
69 args.append("--keepbranches")
47bc4ef30315 Added support for the Mercurial rebase extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
70 if detach:
47bc4ef30315 Added support for the Mercurial rebase extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
71 args.append("--detach")
6459
68c13732795b rebase, HgRebaseDialog: add support for --confirm and --dry-run as of Mercurial 4.7.0.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6458
diff changeset
72 if dryRunOnly:
68c13732795b rebase, HgRebaseDialog: add support for --confirm and --dry-run as of Mercurial 4.7.0.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6458
diff changeset
73 args.append("--dry-run")
68c13732795b rebase, HgRebaseDialog: add support for --confirm and --dry-run as of Mercurial 4.7.0.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6458
diff changeset
74 elif dryRunConfirm:
68c13732795b rebase, HgRebaseDialog: add support for --confirm and --dry-run as of Mercurial 4.7.0.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6458
diff changeset
75 args.append("--confirm")
1093
47bc4ef30315 Added support for the Mercurial rebase extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
76 args.append("--verbose")
47bc4ef30315 Added support for the Mercurial rebase extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
77
3190
a9a94491c4fd Changed the code to use QObject.tr() instead of QObject.trUtf8().
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3160
diff changeset
78 dia = HgDialog(self.tr('Rebase Changesets'), self.vcs)
1093
47bc4ef30315 Added support for the Mercurial rebase extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
79 res = dia.startProcess(args, repodir)
47bc4ef30315 Added support for the Mercurial rebase extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
80 if res:
7759
51aa6c6b66f7 Changed calls to exec_() into exec() (remainder of Python2 elimination).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7360
diff changeset
81 dia.exec()
1093
47bc4ef30315 Added support for the Mercurial rebase extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
82 res = dia.hasAddOrDelete()
47bc4ef30315 Added support for the Mercurial rebase extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
83 self.vcs.checkVCSStatus()
47bc4ef30315 Added support for the Mercurial rebase extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
84 return res
47bc4ef30315 Added support for the Mercurial rebase extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
85
47bc4ef30315 Added support for the Mercurial rebase extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
86 def hgRebaseContinue(self, path):
47bc4ef30315 Added support for the Mercurial rebase extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
87 """
47bc4ef30315 Added support for the Mercurial rebase extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
88 Public method to continue rebasing changesets from another branch.
47bc4ef30315 Added support for the Mercurial rebase extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
89
47bc4ef30315 Added support for the Mercurial rebase extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
90 @param path directory name of the project (string)
47bc4ef30315 Added support for the Mercurial rebase extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
91 @return flag indicating that the project should be reread (boolean)
47bc4ef30315 Added support for the Mercurial rebase extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
92 """
47bc4ef30315 Added support for the Mercurial rebase extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
93 # find the root of the repo
47bc4ef30315 Added support for the Mercurial rebase extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
94 repodir = self.vcs.splitPath(path)[0]
47bc4ef30315 Added support for the Mercurial rebase extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
95 while not os.path.isdir(os.path.join(repodir, self.vcs.adminDir)):
47bc4ef30315 Added support for the Mercurial rebase extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
96 repodir = os.path.dirname(repodir)
1318
6fa303bd65d6 Fixed issues in various Mercurial files that could cause infinite loops on Windows systems.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1249
diff changeset
97 if os.path.splitdrive(repodir)[1] == os.sep:
1093
47bc4ef30315 Added support for the Mercurial rebase extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
98 return False
47bc4ef30315 Added support for the Mercurial rebase extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
99
3302
e92f0dd51979 Removed the Mercurial support for a command options dialog and added useable global options to the Mercurial config page.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3190
diff changeset
100 args = self.vcs.initCommand("rebase")
1093
47bc4ef30315 Added support for the Mercurial rebase extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
101 args.append("--continue")
47bc4ef30315 Added support for the Mercurial rebase extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
102 args.append("--verbose")
47bc4ef30315 Added support for the Mercurial rebase extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
103
3190
a9a94491c4fd Changed the code to use QObject.tr() instead of QObject.trUtf8().
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3160
diff changeset
104 dia = HgDialog(self.tr('Rebase Changesets (Continue)'), self.vcs)
1093
47bc4ef30315 Added support for the Mercurial rebase extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
105 res = dia.startProcess(args, repodir)
47bc4ef30315 Added support for the Mercurial rebase extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
106 if res:
7759
51aa6c6b66f7 Changed calls to exec_() into exec() (remainder of Python2 elimination).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7360
diff changeset
107 dia.exec()
1093
47bc4ef30315 Added support for the Mercurial rebase extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
108 res = dia.hasAddOrDelete()
47bc4ef30315 Added support for the Mercurial rebase extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
109 self.vcs.checkVCSStatus()
47bc4ef30315 Added support for the Mercurial rebase extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
110 return res
47bc4ef30315 Added support for the Mercurial rebase extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
111
47bc4ef30315 Added support for the Mercurial rebase extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
112 def hgRebaseAbort(self, path):
47bc4ef30315 Added support for the Mercurial rebase extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
113 """
47bc4ef30315 Added support for the Mercurial rebase extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
114 Public method to abort rebasing changesets from another branch.
47bc4ef30315 Added support for the Mercurial rebase extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
115
47bc4ef30315 Added support for the Mercurial rebase extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
116 @param path directory name of the project (string)
47bc4ef30315 Added support for the Mercurial rebase extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
117 @return flag indicating that the project should be reread (boolean)
47bc4ef30315 Added support for the Mercurial rebase extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
118 """
47bc4ef30315 Added support for the Mercurial rebase extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
119 # find the root of the repo
47bc4ef30315 Added support for the Mercurial rebase extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
120 repodir = self.vcs.splitPath(path)[0]
47bc4ef30315 Added support for the Mercurial rebase extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
121 while not os.path.isdir(os.path.join(repodir, self.vcs.adminDir)):
47bc4ef30315 Added support for the Mercurial rebase extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
122 repodir = os.path.dirname(repodir)
1318
6fa303bd65d6 Fixed issues in various Mercurial files that could cause infinite loops on Windows systems.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1249
diff changeset
123 if os.path.splitdrive(repodir)[1] == os.sep:
1093
47bc4ef30315 Added support for the Mercurial rebase extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
124 return False
47bc4ef30315 Added support for the Mercurial rebase extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
125
3302
e92f0dd51979 Removed the Mercurial support for a command options dialog and added useable global options to the Mercurial config page.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3190
diff changeset
126 args = self.vcs.initCommand("rebase")
1093
47bc4ef30315 Added support for the Mercurial rebase extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
127 args.append("--abort")
47bc4ef30315 Added support for the Mercurial rebase extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
128 args.append("--verbose")
47bc4ef30315 Added support for the Mercurial rebase extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
129
3190
a9a94491c4fd Changed the code to use QObject.tr() instead of QObject.trUtf8().
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3160
diff changeset
130 dia = HgDialog(self.tr('Rebase Changesets (Abort)'), self.vcs)
1093
47bc4ef30315 Added support for the Mercurial rebase extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
131 res = dia.startProcess(args, repodir)
47bc4ef30315 Added support for the Mercurial rebase extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
132 if res:
7759
51aa6c6b66f7 Changed calls to exec_() into exec() (remainder of Python2 elimination).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7360
diff changeset
133 dia.exec()
1093
47bc4ef30315 Added support for the Mercurial rebase extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
134 res = dia.hasAddOrDelete()
47bc4ef30315 Added support for the Mercurial rebase extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
135 self.vcs.checkVCSStatus()
47bc4ef30315 Added support for the Mercurial rebase extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
136 return res

eric ide

mercurial