45 self.vcs.hgGetBookmarksList(), |
45 self.vcs.hgGetBookmarksList(), |
46 rev) |
46 rev) |
47 if dlg.exec() == QDialog.DialogCode.Accepted: |
47 if dlg.exec() == QDialog.DialogCode.Accepted: |
48 rev, force, keep = dlg.getData() |
48 rev, force, keep = dlg.getData() |
49 |
49 |
|
50 editor = os.path.join( |
|
51 os.path.dirname(__file__), "HgHisteditEditor.py") |
|
52 |
50 args = self.vcs.initCommand("histedit") |
53 args = self.vcs.initCommand("histedit") |
51 args.append("-v") |
54 args.append("-v") |
|
55 args.extend(["--config", f"ui.editor={sys.executable} {editor}"]) |
52 if keep: |
56 if keep: |
53 args.append("--keep") |
57 args.append("--keep") |
54 if rev: |
58 if rev: |
55 if rev == "--outgoing": |
59 if rev == "--outgoing": |
56 if force: |
60 if force: |
57 args.append("--force") |
61 args.append("--force") |
58 else: |
62 else: |
59 args.append("--rev") |
63 args.append("--rev") |
60 args.append(rev) |
64 args.append(rev) |
61 |
65 |
62 editor = os.path.join( |
66 env = { |
63 os.path.dirname(__file__), "HgHisteditEditor.py") |
67 "HGEDITOR": "{0} {1}".format(sys.executable, editor), |
64 env = {"HGEDITOR": "{0} {1}".format(sys.executable, editor)} |
68 "EDITOR": "{0} {1}".format(sys.executable, editor), |
|
69 } |
65 |
70 |
66 dia = HgDialog( |
71 dia = HgDialog( |
67 self.tr("Starting histedit session"), |
72 self.tr("Starting histedit session"), |
68 self.vcs, |
73 self.vcs, |
69 useClient=False) |
74 useClient=False) |