je-editor 0.0.220__py3-none-any.whl → 0.0.222__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of je-editor might be problematic. Click here for more details.
- je_editor/code_scan/ruff_thread.py +33 -6
- je_editor/code_scan/watchdog_implement.py +42 -20
- je_editor/code_scan/watchdog_thread.py +54 -9
- je_editor/git_client/commit_graph.py +32 -43
- je_editor/git_client/{git.py → git_action.py} +1 -1
- je_editor/git_client/git_cli.py +4 -4
- je_editor/git_client/github.py +36 -5
- je_editor/pyside_ui/browser/browser_download_window.py +41 -5
- je_editor/pyside_ui/browser/browser_serach_lineedit.py +25 -1
- je_editor/pyside_ui/browser/browser_view.py +42 -1
- je_editor/pyside_ui/browser/browser_widget.py +43 -14
- je_editor/pyside_ui/git_ui/code_diff_compare/__init__.py +0 -0
- je_editor/pyside_ui/git_ui/code_diff_compare/code_diff_viewer_widget.py +90 -0
- je_editor/pyside_ui/git_ui/code_diff_compare/line_number_code_viewer.py +141 -0
- je_editor/pyside_ui/git_ui/code_diff_compare/multi_file_diff_viewer.py +88 -0
- je_editor/pyside_ui/git_ui/code_diff_compare/side_by_side_diff_widget.py +271 -0
- je_editor/pyside_ui/git_ui/git_client/__init__.py +0 -0
- je_editor/pyside_ui/git_ui/{git_branch_tree_widget.py → git_client/git_branch_tree_widget.py} +17 -14
- je_editor/pyside_ui/git_ui/git_client/git_client_gui.py +734 -0
- je_editor/pyside_ui/main_ui/ai_widget/langchain_interface.py +1 -1
- je_editor/pyside_ui/main_ui/main_editor.py +0 -3
- je_editor/pyside_ui/main_ui/menu/dock_menu/build_dock_menu.py +14 -3
- je_editor/pyside_ui/main_ui/menu/tab_menu/build_tab_menu.py +19 -4
- je_editor/utils/multi_language/english.py +2 -1
- je_editor/utils/multi_language/traditional_chinese.py +2 -2
- {je_editor-0.0.220.dist-info → je_editor-0.0.222.dist-info}/METADATA +4 -4
- {je_editor-0.0.220.dist-info → je_editor-0.0.222.dist-info}/RECORD +32 -26
- je_editor/pyside_ui/git_ui/git_client_gui.py +0 -291
- /je_editor/pyside_ui/git_ui/{commit_table.py → git_client/commit_table.py} +0 -0
- /je_editor/pyside_ui/git_ui/{graph_view.py → git_client/graph_view.py} +0 -0
- {je_editor-0.0.220.dist-info → je_editor-0.0.222.dist-info}/WHEEL +0 -0
- {je_editor-0.0.220.dist-info → je_editor-0.0.222.dist-info}/licenses/LICENSE +0 -0
- {je_editor-0.0.220.dist-info → je_editor-0.0.222.dist-info}/top_level.txt +0 -0
|
@@ -5,7 +5,7 @@ import re
|
|
|
5
5
|
from typing import Union, TYPE_CHECKING
|
|
6
6
|
|
|
7
7
|
from PySide6.QtWidgets import QMessageBox
|
|
8
|
-
from
|
|
8
|
+
from langchain_core.prompts.chat import SystemMessagePromptTemplate
|
|
9
9
|
from langchain_openai import ChatOpenAI
|
|
10
10
|
from pydantic import SecretStr
|
|
11
11
|
|
|
@@ -105,9 +105,6 @@ class EditorMain(QMainWindow, QtStyleTools):
|
|
|
105
105
|
self.redirect_timer.start()
|
|
106
106
|
# TAB Add
|
|
107
107
|
self.tab_widget.addTab(EditorWidget(self), language_wrapper.language_word_dict.get("tab_name_editor"))
|
|
108
|
-
self.tab_widget.addTab(
|
|
109
|
-
FrontEngineMainUI(show_system_tray_ray=False, redirect_output=False),
|
|
110
|
-
language_wrapper.language_word_dict.get("tab_name_frontengine"))
|
|
111
108
|
self.tab_widget.addTab(BrowserWidget(), language_wrapper.language_word_dict.get("tab_name_web_browser"))
|
|
112
109
|
self.tab_widget.addTab(
|
|
113
110
|
BrowserWidget(start_url="https://stackoverflow.com/", search_prefix="https://stackoverflow.com/search?q="),
|
|
@@ -8,10 +8,11 @@ from PySide6.QtGui import QAction
|
|
|
8
8
|
from PySide6.QtWidgets import QFileDialog
|
|
9
9
|
from frontengine import FrontEngineMainUI
|
|
10
10
|
|
|
11
|
+
from je_editor.pyside_ui.git_ui.code_diff_compare.code_diff_viewer_widget import DiffViewerWidget
|
|
11
12
|
from je_editor.pyside_ui.browser.browser_widget import BrowserWidget
|
|
12
13
|
from je_editor.pyside_ui.code.variable_inspector.inspector_gui import VariableInspector
|
|
13
|
-
from je_editor.pyside_ui.git_ui.git_branch_tree_widget import GitTreeViewGUI
|
|
14
|
-
from je_editor.pyside_ui.git_ui.git_client_gui import
|
|
14
|
+
from je_editor.pyside_ui.git_ui.git_client.git_branch_tree_widget import GitTreeViewGUI
|
|
15
|
+
from je_editor.pyside_ui.git_ui.git_client.git_client_gui import GitGui
|
|
15
16
|
from je_editor.pyside_ui.main_ui.ai_widget.chat_ui import ChatUI
|
|
16
17
|
from je_editor.pyside_ui.main_ui.console_widget.console_gui import ConsoleWidget
|
|
17
18
|
from je_editor.pyside_ui.main_ui.dock.destroy_dock import DestroyDock
|
|
@@ -99,6 +100,13 @@ def set_dock_menu(ui_we_want_to_set: EditorMain) -> None:
|
|
|
99
100
|
lambda: add_dock_widget(ui_we_want_to_set, "console_widget")
|
|
100
101
|
)
|
|
101
102
|
ui_we_want_to_set.dock_menu.addAction(ui_we_want_to_set.dock_menu.new_dynamic_console)
|
|
103
|
+
# Code diff viewer
|
|
104
|
+
ui_we_want_to_set.dock_menu.new_code_diff_viewer = QAction(
|
|
105
|
+
language_wrapper.language_word_dict.get("tab_code_diff_viewer_tab_name"))
|
|
106
|
+
ui_we_want_to_set.dock_menu.new_code_diff_viewer.triggered.connect(
|
|
107
|
+
lambda: add_dock_widget(ui_we_want_to_set, "code_diff_viewer")
|
|
108
|
+
)
|
|
109
|
+
ui_we_want_to_set.dock_menu.addAction(ui_we_want_to_set.dock_menu.new_code_diff_viewer)
|
|
102
110
|
|
|
103
111
|
def add_dock_widget(ui_we_want_to_set: EditorMain, widget_type: str = None):
|
|
104
112
|
jeditor_logger.info("build_dock_menu.py add_dock_widget "
|
|
@@ -134,7 +142,7 @@ def add_dock_widget(ui_we_want_to_set: EditorMain, widget_type: str = None):
|
|
|
134
142
|
dock_widget.setWidget(ChatUI(ui_we_want_to_set))
|
|
135
143
|
elif widget_type == "git_client":
|
|
136
144
|
dock_widget.setWindowTitle(language_wrapper.language_word_dict.get("tab_menu_git_client_tab_name"))
|
|
137
|
-
dock_widget.setWidget(
|
|
145
|
+
dock_widget.setWidget(GitGui())
|
|
138
146
|
elif widget_type == "git_branch_tree_view":
|
|
139
147
|
dock_widget.setWindowTitle(language_wrapper.language_word_dict.get("tab_menu_git_branch_tree_view_tab_name"))
|
|
140
148
|
dock_widget.setWidget(GitTreeViewGUI())
|
|
@@ -144,6 +152,9 @@ def add_dock_widget(ui_we_want_to_set: EditorMain, widget_type: str = None):
|
|
|
144
152
|
elif widget_type == "console_widget":
|
|
145
153
|
dock_widget.setWindowTitle(language_wrapper.language_word_dict.get("tab_menu_console_widget_tab_name"))
|
|
146
154
|
dock_widget.setWidget(ConsoleWidget())
|
|
155
|
+
elif widget_type == "code_diff_viewer":
|
|
156
|
+
dock_widget.setWindowTitle(language_wrapper.language_word_dict.get("tab_code_diff_viewer_tab_name"))
|
|
157
|
+
dock_widget.setWidget(DiffViewerWidget())
|
|
147
158
|
else:
|
|
148
159
|
dock_widget.setWindowTitle(language_wrapper.language_word_dict.get("dock_browser_title"))
|
|
149
160
|
dock_widget.setWidget(BrowserWidget())
|
|
@@ -4,10 +4,11 @@ from typing import TYPE_CHECKING
|
|
|
4
4
|
|
|
5
5
|
from frontengine import FrontEngineMainUI
|
|
6
6
|
|
|
7
|
+
from je_editor.pyside_ui.git_ui.code_diff_compare.code_diff_viewer_widget import DiffViewerWidget
|
|
7
8
|
from je_editor.pyside_ui.browser.browser_widget import BrowserWidget
|
|
8
9
|
from je_editor.pyside_ui.code.variable_inspector.inspector_gui import VariableInspector
|
|
9
|
-
from je_editor.pyside_ui.git_ui.git_branch_tree_widget import GitTreeViewGUI
|
|
10
|
-
from je_editor.pyside_ui.git_ui.git_client_gui import
|
|
10
|
+
from je_editor.pyside_ui.git_ui.git_client.git_branch_tree_widget import GitTreeViewGUI
|
|
11
|
+
from je_editor.pyside_ui.git_ui.git_client.git_client_gui import GitGui
|
|
11
12
|
from je_editor.pyside_ui.main_ui.ai_widget.chat_ui import ChatUI
|
|
12
13
|
from je_editor.pyside_ui.main_ui.console_widget.console_gui import ConsoleWidget
|
|
13
14
|
from je_editor.pyside_ui.main_ui.editor.editor_widget import EditorWidget
|
|
@@ -95,6 +96,13 @@ def set_tab_menu(ui_we_want_to_set: EditorMain) -> None:
|
|
|
95
96
|
lambda: add_console_widget_tab(ui_we_want_to_set)
|
|
96
97
|
)
|
|
97
98
|
ui_we_want_to_set.tab_menu.addAction(ui_we_want_to_set.tab_menu.add_console_widget_ui_action)
|
|
99
|
+
# Code diff viewer
|
|
100
|
+
ui_we_want_to_set.tab_menu.add_code_diff_viewer_ui_action = QAction(
|
|
101
|
+
language_wrapper.language_word_dict.get("tab_code_diff_viewer_tab_name"))
|
|
102
|
+
ui_we_want_to_set.tab_menu.add_code_diff_viewer_ui_action.triggered.connect(
|
|
103
|
+
lambda: add_code_diff_compare_tab(ui_we_want_to_set)
|
|
104
|
+
)
|
|
105
|
+
ui_we_want_to_set.tab_menu.addAction(ui_we_want_to_set.tab_menu.add_code_diff_viewer_ui_action)
|
|
98
106
|
|
|
99
107
|
def add_editor_tab(ui_we_want_to_set: EditorMain):
|
|
100
108
|
jeditor_logger.info(f"build_tab_menu.py add editor tab ui_we_want_to_set: {ui_we_want_to_set}")
|
|
@@ -149,7 +157,7 @@ def add_chat_ui_tab(ui_we_want_to_set: EditorMain):
|
|
|
149
157
|
def add_git_client_tab(ui_we_want_to_set: EditorMain):
|
|
150
158
|
jeditor_logger.info(f"build_tab_menu.py add git client tab ui_we_want_to_set: {ui_we_want_to_set}")
|
|
151
159
|
ui_we_want_to_set.tab_widget.addTab(
|
|
152
|
-
|
|
160
|
+
GitGui(),
|
|
153
161
|
f"{language_wrapper.language_word_dict.get('tab_menu_git_client_tab_name')} "
|
|
154
162
|
f"{ui_we_want_to_set.tab_widget.count()}")
|
|
155
163
|
|
|
@@ -173,4 +181,11 @@ def add_console_widget_tab(ui_we_want_to_set: EditorMain):
|
|
|
173
181
|
ui_we_want_to_set.tab_widget.addTab(
|
|
174
182
|
ConsoleWidget(),
|
|
175
183
|
f"{language_wrapper.language_word_dict.get('tab_menu_console_widget_tab_name')} "
|
|
176
|
-
f"{ui_we_want_to_set.tab_widget.count()}")
|
|
184
|
+
f"{ui_we_want_to_set.tab_widget.count()}")
|
|
185
|
+
|
|
186
|
+
def add_code_diff_compare_tab(ui_we_want_to_set: EditorMain):
|
|
187
|
+
jeditor_logger.info(f"build_tab_menu.py add code diff compare tab ui_we_want_to_set: {ui_we_want_to_set}")
|
|
188
|
+
ui_we_want_to_set.tab_widget.addTab(
|
|
189
|
+
DiffViewerWidget(),
|
|
190
|
+
f"{language_wrapper.language_word_dict.get('tab_code_diff_viewer_tab_name')} "
|
|
191
|
+
f"{ui_we_want_to_set.tab_widget.count()}")
|
|
@@ -114,6 +114,7 @@ please make sure that the current encoding is consistent with the default encodi
|
|
|
114
114
|
"tab_menu_git_branch_tree_view_tab_name": "Git BranchTreeViewer",
|
|
115
115
|
"tab_menu_variable_inspector_tab_name": "Variable Inspector",
|
|
116
116
|
"tab_menu_console_widget_tab_name": "Console Widget",
|
|
117
|
+
"tab_code_diff_viewer_tab_name": "Code Diff Viewer",
|
|
117
118
|
# Text Menu
|
|
118
119
|
"text_menu_label": "Text",
|
|
119
120
|
"text_menu_label_font": "Font",
|
|
@@ -216,5 +217,5 @@ please make sure that the current encoding is consistent with the default encodi
|
|
|
216
217
|
"dynamic_console_process_running": "Process is running; stop it first",
|
|
217
218
|
"dynamic_console_done": "[done] exit={code}, status={status}",
|
|
218
219
|
"dynamic_console_system_prefix": "[system] ",
|
|
219
|
-
|
|
220
|
+
# Code diff viewer
|
|
220
221
|
}
|
|
@@ -104,10 +104,11 @@ traditional_chinese_word_dict = {
|
|
|
104
104
|
"tab_menu_stackoverflow_tab_name": "Stackoverflow",
|
|
105
105
|
"tab_menu_ipython_tab_name": "IPython(Jupyter)",
|
|
106
106
|
"tab_menu_chat_ui_tab_name": "ChatUI",
|
|
107
|
-
"tab_menu_git_client_tab_name": "Git
|
|
107
|
+
"tab_menu_git_client_tab_name": "Git History",
|
|
108
108
|
"tab_menu_git_branch_tree_view_tab_name": "Git BranchTreeViewer",
|
|
109
109
|
"tab_menu_variable_inspector_tab_name": "Variable Inspector",
|
|
110
110
|
"tab_menu_console_widget_tab_name": "ConsoleWidget",
|
|
111
|
+
"tab_code_diff_viewer_tab_name": "Code Diff Viewer",
|
|
111
112
|
# Text Menu
|
|
112
113
|
"text_menu_label": "文字",
|
|
113
114
|
"text_menu_label_font": "字體",
|
|
@@ -210,5 +211,4 @@ traditional_chinese_word_dict = {
|
|
|
210
211
|
"dynamic_console_process_running": "程序正在執行;請先停止",
|
|
211
212
|
"dynamic_console_done": "[完成] 退出碼={code}, 狀態={status}",
|
|
212
213
|
"dynamic_console_system_prefix": "[系統] ",
|
|
213
|
-
|
|
214
214
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: je_editor
|
|
3
|
-
Version: 0.0.
|
|
3
|
+
Version: 0.0.222
|
|
4
4
|
Summary: JEditor is basic but powerful editor include GPT
|
|
5
5
|
Author-email: JE-Chen <jechenmailman@gmail.com>
|
|
6
6
|
Project-URL: Homepage, https://github.com/JE-Chen/je_editor
|
|
@@ -16,15 +16,15 @@ Classifier: Operating System :: OS Independent
|
|
|
16
16
|
Requires-Python: >=3.10
|
|
17
17
|
Description-Content-Type: text/markdown
|
|
18
18
|
License-File: LICENSE
|
|
19
|
-
Requires-Dist: PySide6==6.
|
|
19
|
+
Requires-Dist: PySide6==6.10.0
|
|
20
20
|
Requires-Dist: qt-material
|
|
21
21
|
Requires-Dist: yapf
|
|
22
22
|
Requires-Dist: frontengine
|
|
23
23
|
Requires-Dist: pycodestyle
|
|
24
24
|
Requires-Dist: jedi
|
|
25
25
|
Requires-Dist: qtconsole
|
|
26
|
-
Requires-Dist: langchain_openai
|
|
27
|
-
Requires-Dist: langchain
|
|
26
|
+
Requires-Dist: langchain_openai==1.0.0
|
|
27
|
+
Requires-Dist: langchain==1.0.0
|
|
28
28
|
Requires-Dist: pydantic
|
|
29
29
|
Requires-Dist: watchdog
|
|
30
30
|
Requires-Dist: ruff
|
|
@@ -2,20 +2,20 @@ je_editor/__init__.py,sha256=IZm-mUID0W7-smb9SYEtwcWrpr8mz6OyF4e5akHGrFU,2405
|
|
|
2
2
|
je_editor/__main__.py,sha256=2ymm4ESRcqP4K1YQyeaDbGhuK-0C1IausIiEOpbm6Ds,570
|
|
3
3
|
je_editor/start_editor.py,sha256=hW7JFOjBkcW7hdC7q-9JsaVTeSNCep1GsqxLmbMU4wg,543
|
|
4
4
|
je_editor/code_scan/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
5
|
-
je_editor/code_scan/ruff_thread.py,sha256=
|
|
6
|
-
je_editor/code_scan/watchdog_implement.py,sha256=
|
|
7
|
-
je_editor/code_scan/watchdog_thread.py,sha256=
|
|
5
|
+
je_editor/code_scan/ruff_thread.py,sha256=DNM4cEZt5PBqIDtyy5GXq9BFwLhSuLu8FFBxn3_9xRE,1983
|
|
6
|
+
je_editor/code_scan/watchdog_implement.py,sha256=tjkA_9_bHEzGdTm_O1IPSwCka9ELMR4cI_nBKEHHV34,2114
|
|
7
|
+
je_editor/code_scan/watchdog_thread.py,sha256=UPIYpUCdgAox-44gJnp10ooJfBono1Hkkj5JFi2B_As,2609
|
|
8
8
|
je_editor/git_client/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
9
|
-
je_editor/git_client/commit_graph.py,sha256=
|
|
10
|
-
je_editor/git_client/
|
|
11
|
-
je_editor/git_client/git_cli.py,sha256=
|
|
12
|
-
je_editor/git_client/github.py,sha256=
|
|
9
|
+
je_editor/git_client/commit_graph.py,sha256=z5as1qS0rQMp_u8xdtIn0b0FKyZzUm68l3EiTjvykCU,2677
|
|
10
|
+
je_editor/git_client/git_action.py,sha256=FgIvS_xPZSu0H_UIQoaqJKJa-JZiQwj1oGLVOeSD1nA,6256
|
|
11
|
+
je_editor/git_client/git_cli.py,sha256=Ad-OdPyOQvAvUHeXWVwvHPCi7xo6o3ljKMTlUzOW53Q,2096
|
|
12
|
+
je_editor/git_client/github.py,sha256=aJTIl2LftyWR0Olmv2WDuJDkmLLukz6JKd3FZntb2-8,3324
|
|
13
13
|
je_editor/pyside_ui/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
14
14
|
je_editor/pyside_ui/browser/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
15
|
-
je_editor/pyside_ui/browser/browser_download_window.py,sha256=
|
|
16
|
-
je_editor/pyside_ui/browser/browser_serach_lineedit.py,sha256=
|
|
17
|
-
je_editor/pyside_ui/browser/browser_view.py,sha256=
|
|
18
|
-
je_editor/pyside_ui/browser/browser_widget.py,sha256=
|
|
15
|
+
je_editor/pyside_ui/browser/browser_download_window.py,sha256=cCOj1WeglNIbabJZdXL0eXWE6bZT-U9huZGFbSSKXgw,3397
|
|
16
|
+
je_editor/pyside_ui/browser/browser_serach_lineedit.py,sha256=78Wa1X9LWoJW_ppCVTOmD51rJzjOElJGkdPkk4VBkBY,1875
|
|
17
|
+
je_editor/pyside_ui/browser/browser_view.py,sha256=6b0J46Y8GnfdYuR40hqlanpG84AtrPkEo9laS8nc374,2771
|
|
18
|
+
je_editor/pyside_ui/browser/browser_widget.py,sha256=3DINK7V7BSckm8tqvDggBtGo3sYDrYHsyeFmsqH9zFs,4246
|
|
19
19
|
je_editor/pyside_ui/code/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
20
20
|
je_editor/pyside_ui/code/running_process_manager.py,sha256=VdfdprPNlPmMySOKDOjEEl5X9IsJVPSDb0a2KDKgiQg,1008
|
|
21
21
|
je_editor/pyside_ui/code/auto_save/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
@@ -47,17 +47,23 @@ je_editor/pyside_ui/dialog/search_ui/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeu
|
|
|
47
47
|
je_editor/pyside_ui/dialog/search_ui/search_error_box.py,sha256=jSa423cQW_xQ2WAj46CCWPsCP0Gy7g-UDe5o8LQyKQk,1190
|
|
48
48
|
je_editor/pyside_ui/dialog/search_ui/search_text_box.py,sha256=ul-98FVByq_TNkkLZcBSF4VSwIQNBBj-4e6jYlh6YEA,1229
|
|
49
49
|
je_editor/pyside_ui/git_ui/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
50
|
-
je_editor/pyside_ui/git_ui/
|
|
51
|
-
je_editor/pyside_ui/git_ui/
|
|
52
|
-
je_editor/pyside_ui/git_ui/
|
|
53
|
-
je_editor/pyside_ui/git_ui/
|
|
50
|
+
je_editor/pyside_ui/git_ui/code_diff_compare/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
51
|
+
je_editor/pyside_ui/git_ui/code_diff_compare/code_diff_viewer_widget.py,sha256=9TyUydcMO3_II9U-lALEfxfwQFJOj1Xlk0RKBOU4NUQ,3411
|
|
52
|
+
je_editor/pyside_ui/git_ui/code_diff_compare/line_number_code_viewer.py,sha256=VFC98ERf-Wj78MTD0bwAXOKtFRTjcdkndA-SiuiTI0g,5638
|
|
53
|
+
je_editor/pyside_ui/git_ui/code_diff_compare/multi_file_diff_viewer.py,sha256=Y8Z0MUBkxWjV6dnvMnmopDFCmxmUX49cAmX3DHgs-50,3195
|
|
54
|
+
je_editor/pyside_ui/git_ui/code_diff_compare/side_by_side_diff_widget.py,sha256=v07KV3V4C6vBLqyoJg4YuFWStx_cVH31jaeniH9V2lw,11100
|
|
55
|
+
je_editor/pyside_ui/git_ui/git_client/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
56
|
+
je_editor/pyside_ui/git_ui/git_client/commit_table.py,sha256=5NkPx27omhtql1n0E51i5wuXqojnioxRD3SJPq-X0Xg,1136
|
|
57
|
+
je_editor/pyside_ui/git_ui/git_client/git_branch_tree_widget.py,sha256=wZ2OwY1LZ-Qv4TFx_7uuDGgb2jUsUKiUVgZoU_mg__I,4748
|
|
58
|
+
je_editor/pyside_ui/git_ui/git_client/git_client_gui.py,sha256=PIGrJOlEba4Rg3rHOqNRf-9IjQa2ALl2O5z5mQMu0wo,31542
|
|
59
|
+
je_editor/pyside_ui/git_ui/git_client/graph_view.py,sha256=0qLxZMzRZMpDFACiUlv0EyyVkAZiYFlU7d2jE5NuVIE,6045
|
|
54
60
|
je_editor/pyside_ui/main_ui/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
55
|
-
je_editor/pyside_ui/main_ui/main_editor.py,sha256
|
|
61
|
+
je_editor/pyside_ui/main_ui/main_editor.py,sha256=ZehoXiVy9ZE6_2tHdAC3Gdg5PqdccpqZnM-oD6d9sOQ,11339
|
|
56
62
|
je_editor/pyside_ui/main_ui/ai_widget/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
57
63
|
je_editor/pyside_ui/main_ui/ai_widget/ai_config.py,sha256=Uc9UkrIeALqjmZCF5ukXtSgU1EB4xa5223gk3CfYXX4,459
|
|
58
64
|
je_editor/pyside_ui/main_ui/ai_widget/ask_thread.py,sha256=ma5Cnwlr0RbU-sytmodcYabWueyGE8DKKISZ_0zf3Eo,571
|
|
59
65
|
je_editor/pyside_ui/main_ui/ai_widget/chat_ui.py,sha256=yBoWXvGvgUCWjmPoBcOhj0mtOm0R42mYEs7FokYQmnE,6763
|
|
60
|
-
je_editor/pyside_ui/main_ui/ai_widget/langchain_interface.py,sha256=
|
|
66
|
+
je_editor/pyside_ui/main_ui/ai_widget/langchain_interface.py,sha256=_jykolLkwrGXL1Y_Scyf6Y9560rb9blGwDlpflRm9RI,1773
|
|
61
67
|
je_editor/pyside_ui/main_ui/console_widget/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
62
68
|
je_editor/pyside_ui/main_ui/console_widget/console_gui.py,sha256=3H0Ocj9oDtgAoH7mT2YjDsSeFW3FphsstJqtIesS4yA,5572
|
|
63
69
|
je_editor/pyside_ui/main_ui/console_widget/qprocess_adapter.py,sha256=UIyIoCEyt6hMxc2oLH68ioERFyuPDnPub05_Yi_-rGs,2304
|
|
@@ -74,7 +80,7 @@ je_editor/pyside_ui/main_ui/menu/set_menu_bar.py,sha256=I12DXLyRO4cKe17fQY-QDazK
|
|
|
74
80
|
je_editor/pyside_ui/main_ui/menu/check_style_menu/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
75
81
|
je_editor/pyside_ui/main_ui/menu/check_style_menu/build_check_style_menu.py,sha256=1wD6FI21Dw3IcQONuTkHP9rUPGwY70OvCtSc-ZcTKMk,3793
|
|
76
82
|
je_editor/pyside_ui/main_ui/menu/dock_menu/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
77
|
-
je_editor/pyside_ui/main_ui/menu/dock_menu/build_dock_menu.py,sha256=
|
|
83
|
+
je_editor/pyside_ui/main_ui/menu/dock_menu/build_dock_menu.py,sha256=KWblg3ZxsMSPLYWeYsnx15vJ3TdHL7kQQEEiuk0t0DE,9146
|
|
78
84
|
je_editor/pyside_ui/main_ui/menu/file_menu/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
79
85
|
je_editor/pyside_ui/main_ui/menu/file_menu/build_file_menu.py,sha256=YT6kvXShRbfM4Qo51VveO_IK8uDqlNrGwHZUiM6_Tes,6881
|
|
80
86
|
je_editor/pyside_ui/main_ui/menu/help_menu/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
@@ -93,7 +99,7 @@ je_editor/pyside_ui/main_ui/menu/run_menu/under_run_menu/utils.py,sha256=zk5adQ7
|
|
|
93
99
|
je_editor/pyside_ui/main_ui/menu/style_menu/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
94
100
|
je_editor/pyside_ui/main_ui/menu/style_menu/build_style_menu.py,sha256=OjfcjQ7fA1Z1rMwIS9oGkIkC-jy-e0jdGoYo1btTqUQ,1852
|
|
95
101
|
je_editor/pyside_ui/main_ui/menu/tab_menu/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
96
|
-
je_editor/pyside_ui/main_ui/menu/tab_menu/build_tab_menu.py,sha256=
|
|
102
|
+
je_editor/pyside_ui/main_ui/menu/tab_menu/build_tab_menu.py,sha256=O9EGA_3FrIb-wkyeRbCQm4nzEoEebLDsbYcEGsqtR3o,10182
|
|
97
103
|
je_editor/pyside_ui/main_ui/menu/text_menu/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
98
104
|
je_editor/pyside_ui/main_ui/menu/text_menu/build_text_menu.py,sha256=k3pOpK4i8ccs3D8VIrNx8g3kUDp1fZdqv9H5uEvNl5c,3558
|
|
99
105
|
je_editor/pyside_ui/main_ui/save_settings/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
@@ -120,15 +126,15 @@ je_editor/utils/json_format/json_process.py,sha256=tszo48OnVivVkuuPrl-FtGaaq-1YO
|
|
|
120
126
|
je_editor/utils/logging/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
121
127
|
je_editor/utils/logging/loggin_instance.py,sha256=5MUuLesU_WpR_Iu1uoAATi5Bj2yMYkimZrMfiXbk5pI,881
|
|
122
128
|
je_editor/utils/multi_language/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
123
|
-
je_editor/utils/multi_language/english.py,sha256=
|
|
129
|
+
je_editor/utils/multi_language/english.py,sha256=r1GSpQZNGoeqgvOvaz1r9rJgEMGLjHIIyn7UHiKILBg,10047
|
|
124
130
|
je_editor/utils/multi_language/multi_language_wrapper.py,sha256=_MtYrE51poQ1p_iWvT2eg_604uj6IsiBgGpifWpYLGc,1050
|
|
125
|
-
je_editor/utils/multi_language/traditional_chinese.py,sha256=
|
|
131
|
+
je_editor/utils/multi_language/traditional_chinese.py,sha256=JS47iDkVgPQBQi-13Zr32joN8rnz22HBR79vaiEz8W4,10102
|
|
126
132
|
je_editor/utils/redirect_manager/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
127
133
|
je_editor/utils/redirect_manager/redirect_manager_class.py,sha256=1gICetKpohBvmxmVhnqeCRq7AQS2YWK4AURmrqnVYVw,2277
|
|
128
134
|
je_editor/utils/venv_check/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
129
135
|
je_editor/utils/venv_check/check_venv.py,sha256=oCrMdue4NYUUGrVifh_iHFwIgxVx9azYN4jz3Xiulgg,999
|
|
130
|
-
je_editor-0.0.
|
|
131
|
-
je_editor-0.0.
|
|
132
|
-
je_editor-0.0.
|
|
133
|
-
je_editor-0.0.
|
|
134
|
-
je_editor-0.0.
|
|
136
|
+
je_editor-0.0.222.dist-info/licenses/LICENSE,sha256=KMhUHh6pnIUvmXDW-49L_Sz63bqkOlPDqsecaqKiitU,1091
|
|
137
|
+
je_editor-0.0.222.dist-info/METADATA,sha256=6FccWz2MH7kpbQpNXxZk8Jj4tWL-QlMU9VqAOqpZDtU,3487
|
|
138
|
+
je_editor-0.0.222.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
139
|
+
je_editor-0.0.222.dist-info/top_level.txt,sha256=_9YA7BgxpkmdLs-5V_UQILxClcMRgPyG1a3qaE-Bkcs,10
|
|
140
|
+
je_editor-0.0.222.dist-info/RECORD,,
|
|
@@ -1,291 +0,0 @@
|
|
|
1
|
-
import traceback
|
|
2
|
-
|
|
3
|
-
from PySide6.QtGui import QTextOption
|
|
4
|
-
from PySide6.QtWidgets import QWidget, QLabel, QPushButton, QComboBox, QHBoxLayout, QListWidget, QPlainTextEdit, \
|
|
5
|
-
QSizePolicy, QSplitter, QLineEdit, QVBoxLayout, QMessageBox, QFileDialog, QInputDialog
|
|
6
|
-
|
|
7
|
-
from je_editor.utils.multi_language.multi_language_wrapper import language_wrapper
|
|
8
|
-
from je_editor.git_client.git import Worker, GitService
|
|
9
|
-
from je_editor.git_client.github import GitCloneHandler
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
class Gitgui(QWidget):
|
|
13
|
-
|
|
14
|
-
def __init__(self):
|
|
15
|
-
super().__init__()
|
|
16
|
-
self.git = GitService()
|
|
17
|
-
self.clone_handler = GitCloneHandler()
|
|
18
|
-
self.language_wrapper_get = language_wrapper.language_word_dict.get
|
|
19
|
-
self._init_ui()
|
|
20
|
-
|
|
21
|
-
def _init_ui(self):
|
|
22
|
-
# Top controls
|
|
23
|
-
self.repo_label = QLabel(self.language_wrapper_get("label_repo_initial"))
|
|
24
|
-
self.btn_open = QPushButton(self.language_wrapper_get("btn_open_repo"))
|
|
25
|
-
self.branch_combo = QComboBox()
|
|
26
|
-
self.btn_checkout = QPushButton(self.language_wrapper_get("btn_switch_branch"))
|
|
27
|
-
self.btn_pull = QPushButton(self.language_wrapper_get("btn_pull"))
|
|
28
|
-
self.btn_push = QPushButton(self.language_wrapper_get("btn_push"))
|
|
29
|
-
self.remote_combo = QComboBox()
|
|
30
|
-
self.clone_button = QPushButton(self.language_wrapper_get("btn_clone_remote"))
|
|
31
|
-
self.clone_button.clicked.connect(self._on_clone_remote_repo)
|
|
32
|
-
|
|
33
|
-
top = QHBoxLayout()
|
|
34
|
-
top.addWidget(self.repo_label, 2)
|
|
35
|
-
top.addWidget(self.btn_open)
|
|
36
|
-
top.addWidget(QLabel(self.language_wrapper_get("label_remote")))
|
|
37
|
-
top.addWidget(self.remote_combo)
|
|
38
|
-
top.addWidget(QLabel(self.language_wrapper_get("label_branch")))
|
|
39
|
-
top.addWidget(self.branch_combo, 1)
|
|
40
|
-
top.addWidget(self.btn_checkout)
|
|
41
|
-
top.addWidget(self.btn_pull)
|
|
42
|
-
top.addWidget(self.btn_push)
|
|
43
|
-
top.addWidget(self.clone_button)
|
|
44
|
-
|
|
45
|
-
# Left commits list
|
|
46
|
-
self.commit_list = QListWidget()
|
|
47
|
-
self.commit_list.setMinimumWidth(380)
|
|
48
|
-
|
|
49
|
-
# Right diff viewer
|
|
50
|
-
self.diff_view = QPlainTextEdit()
|
|
51
|
-
self.diff_view.setReadOnly(True)
|
|
52
|
-
self.diff_view.setWordWrapMode(QTextOption.WrapMode.NoWrap)
|
|
53
|
-
self.diff_view.setLineWrapMode(QPlainTextEdit.LineWrapMode.NoWrap)
|
|
54
|
-
self.diff_view.setSizePolicy(QSizePolicy.Policy.Expanding, QSizePolicy.Policy.Expanding)
|
|
55
|
-
mono = self.font()
|
|
56
|
-
mono.setFamily("Consolas")
|
|
57
|
-
mono.setPointSize(10)
|
|
58
|
-
self.diff_view.setFont(mono)
|
|
59
|
-
|
|
60
|
-
splitter = QSplitter()
|
|
61
|
-
splitter.addWidget(self.commit_list)
|
|
62
|
-
splitter.addWidget(self.diff_view)
|
|
63
|
-
splitter.setStretchFactor(0, 0)
|
|
64
|
-
splitter.setStretchFactor(1, 1)
|
|
65
|
-
|
|
66
|
-
# Bottom commit box
|
|
67
|
-
self.msg_edit = QLineEdit()
|
|
68
|
-
self.msg_edit.setPlaceholderText(self.language_wrapper_get("placeholder_commit_message"))
|
|
69
|
-
self.btn_stage_all = QPushButton(self.language_wrapper_get("btn_stage_all"))
|
|
70
|
-
self.btn_commit = QPushButton(self.language_wrapper_get("btn_commit"))
|
|
71
|
-
|
|
72
|
-
bottom = QHBoxLayout()
|
|
73
|
-
bottom.addWidget(QLabel(self.language_wrapper_get("label_message")))
|
|
74
|
-
bottom.addWidget(self.msg_edit, 1)
|
|
75
|
-
bottom.addWidget(self.btn_stage_all)
|
|
76
|
-
bottom.addWidget(self.btn_commit)
|
|
77
|
-
|
|
78
|
-
# Layout
|
|
79
|
-
center_layout = QVBoxLayout()
|
|
80
|
-
center_layout.addLayout(top)
|
|
81
|
-
center_layout.addWidget(splitter, 1)
|
|
82
|
-
center_layout.addLayout(bottom)
|
|
83
|
-
self.setLayout(center_layout)
|
|
84
|
-
|
|
85
|
-
# Events
|
|
86
|
-
self.btn_open.clicked.connect(self.on_open_repo)
|
|
87
|
-
self.branch_combo.currentTextChanged.connect(self.on_branch_changed)
|
|
88
|
-
self.btn_checkout.clicked.connect(self.on_checkout)
|
|
89
|
-
self.commit_list.itemSelectionChanged.connect(self.on_commit_selected)
|
|
90
|
-
self.btn_stage_all.clicked.connect(self.on_stage_all)
|
|
91
|
-
self.btn_commit.clicked.connect(self.on_commit)
|
|
92
|
-
self.btn_pull.clicked.connect(self.on_pull)
|
|
93
|
-
self.btn_push.clicked.connect(self.on_push)
|
|
94
|
-
|
|
95
|
-
self._update_controls(enabled=False)
|
|
96
|
-
|
|
97
|
-
# ------------- UI helpers -------------
|
|
98
|
-
def _update_controls(self, enabled: bool):
|
|
99
|
-
for w in [
|
|
100
|
-
self.branch_combo, self.btn_checkout, self.commit_list,
|
|
101
|
-
self.btn_stage_all, self.btn_commit, self.btn_pull, self.btn_push, self.remote_combo
|
|
102
|
-
]:
|
|
103
|
-
w.setEnabled(enabled)
|
|
104
|
-
|
|
105
|
-
def _error(self, title: str, err: Exception):
|
|
106
|
-
traceback.print_exc()
|
|
107
|
-
QMessageBox.critical(self, title, f"{title}\n\n{err}")
|
|
108
|
-
|
|
109
|
-
def _info(self, title: str, msg: str):
|
|
110
|
-
QMessageBox.information(self, title, msg)
|
|
111
|
-
|
|
112
|
-
# ------------- Event handlers -------------
|
|
113
|
-
def on_open_repo(self):
|
|
114
|
-
path = QFileDialog.getExistingDirectory(self, self.language_wrapper_get("dialog_choose_repo"))
|
|
115
|
-
if not path:
|
|
116
|
-
return
|
|
117
|
-
try:
|
|
118
|
-
self.git.open_repo(path)
|
|
119
|
-
self.repo_label.setText(f"Repo: {path}")
|
|
120
|
-
self._refresh_branches()
|
|
121
|
-
self._refresh_remotes()
|
|
122
|
-
self._update_controls(enabled=True)
|
|
123
|
-
self._load_commits_async()
|
|
124
|
-
except Exception as e:
|
|
125
|
-
self._error(self.language_wrapper_get("err_open_repo"), e)
|
|
126
|
-
|
|
127
|
-
def _refresh_remotes(self):
|
|
128
|
-
self.remote_combo.clear()
|
|
129
|
-
try:
|
|
130
|
-
remotes = self.git.remotes()
|
|
131
|
-
self.remote_combo.addItems(remotes if remotes else [self.language_wrapper_get("default_remote")])
|
|
132
|
-
except Exception:
|
|
133
|
-
self.remote_combo.addItem(self.language_wrapper_get("default_remote"))
|
|
134
|
-
|
|
135
|
-
def _refresh_branches(self):
|
|
136
|
-
self.branch_combo.blockSignals(True)
|
|
137
|
-
self.branch_combo.clear()
|
|
138
|
-
try:
|
|
139
|
-
branches = self.git.list_branches()
|
|
140
|
-
self.branch_combo.addItems(branches)
|
|
141
|
-
cur = self.git.current_branch()
|
|
142
|
-
idx = self.branch_combo.findText(cur)
|
|
143
|
-
if idx >= 0:
|
|
144
|
-
self.branch_combo.setCurrentIndex(idx)
|
|
145
|
-
except Exception as e:
|
|
146
|
-
self._error(self.language_wrapper_get("err_load_branches"), e)
|
|
147
|
-
finally:
|
|
148
|
-
self.branch_combo.blockSignals(False)
|
|
149
|
-
|
|
150
|
-
def on_branch_changed(self, branch: str):
|
|
151
|
-
if not branch:
|
|
152
|
-
return
|
|
153
|
-
self._load_commits_async(branch)
|
|
154
|
-
|
|
155
|
-
def _load_commits_async(self, branch: str | None = None):
|
|
156
|
-
if branch is None:
|
|
157
|
-
try:
|
|
158
|
-
branch = self.git.current_branch()
|
|
159
|
-
except Exception:
|
|
160
|
-
return
|
|
161
|
-
self.commit_list.clear()
|
|
162
|
-
self.diff_view.setPlainText("")
|
|
163
|
-
self.worker = Worker(self.git.list_commits, branch, 200)
|
|
164
|
-
self.worker.done.connect(self._on_commits_loaded)
|
|
165
|
-
self.worker.start()
|
|
166
|
-
|
|
167
|
-
def _on_commits_loaded(self, result, error):
|
|
168
|
-
if error:
|
|
169
|
-
self._error(self.language_wrapper_get("err_load_commits"), error)
|
|
170
|
-
return
|
|
171
|
-
for c in result:
|
|
172
|
-
self.commit_list.addItem(f"{c['hexsha'][:8]} {c['date']} {c['author']} {c['summary']}")
|
|
173
|
-
self.commit_list.setProperty("commit_data", result)
|
|
174
|
-
|
|
175
|
-
def on_checkout(self):
|
|
176
|
-
branch = self.branch_combo.currentText()
|
|
177
|
-
if not branch:
|
|
178
|
-
return
|
|
179
|
-
|
|
180
|
-
def after(res, err):
|
|
181
|
-
if err:
|
|
182
|
-
self._error(self.language_wrapper_get("err_checkout"), err)
|
|
183
|
-
else:
|
|
184
|
-
self._refresh_branches()
|
|
185
|
-
self._load_commits_async(branch)
|
|
186
|
-
self._info(
|
|
187
|
-
self.language_wrapper_get("info_checkout_title"),
|
|
188
|
-
f"{self.language_wrapper_get('info_checkout_msg')} {branch}"
|
|
189
|
-
)
|
|
190
|
-
self.worker = Worker(self.git.checkout, branch)
|
|
191
|
-
self.worker.done.connect(after)
|
|
192
|
-
self.worker.start()
|
|
193
|
-
|
|
194
|
-
def on_commit_selected(self):
|
|
195
|
-
items = self.commit_list.selectedIndexes()
|
|
196
|
-
if not items:
|
|
197
|
-
return
|
|
198
|
-
idx = items[0].row()
|
|
199
|
-
data = self.commit_list.property("commit_data") or []
|
|
200
|
-
if idx >= len(data):
|
|
201
|
-
return
|
|
202
|
-
sha = data[idx]["hexsha"]
|
|
203
|
-
|
|
204
|
-
def after(res, err):
|
|
205
|
-
if err:
|
|
206
|
-
self._error(self.language_wrapper_get("err_read_diff"), err)
|
|
207
|
-
else:
|
|
208
|
-
self.diff_view.setPlainText(res)
|
|
209
|
-
|
|
210
|
-
self.worker = Worker(self.git.show_diff_of_commit, sha)
|
|
211
|
-
self.worker.done.connect(after)
|
|
212
|
-
self.worker.start()
|
|
213
|
-
|
|
214
|
-
def on_stage_all(self):
|
|
215
|
-
def after(res, err):
|
|
216
|
-
if err:
|
|
217
|
-
self._error(self.language_wrapper_get("err_stage"), err)
|
|
218
|
-
else:
|
|
219
|
-
self._info(self.language_wrapper_get("info_stage_title"), self.language_wrapper_get("info_stage_msg"))
|
|
220
|
-
|
|
221
|
-
self.worker = Worker(self.git.stage_all)
|
|
222
|
-
self.worker.done.connect(after)
|
|
223
|
-
self.worker.start()
|
|
224
|
-
|
|
225
|
-
def on_commit(self):
|
|
226
|
-
msg = self.msg_edit.text()
|
|
227
|
-
|
|
228
|
-
def after(res, err):
|
|
229
|
-
if err:
|
|
230
|
-
self._error(self.language_wrapper_get("err_commit"), err)
|
|
231
|
-
else:
|
|
232
|
-
self.msg_edit.clear()
|
|
233
|
-
self._load_commits_async()
|
|
234
|
-
self._info(self.language_wrapper_get("info_commit_title"), self.language_wrapper_get("info_commit_msg"))
|
|
235
|
-
|
|
236
|
-
self.worker = Worker(self.git.commit, msg)
|
|
237
|
-
self.worker.done.connect(after)
|
|
238
|
-
self.worker.start()
|
|
239
|
-
|
|
240
|
-
def on_pull(self):
|
|
241
|
-
remote = self.remote_combo.currentText() or self.language_wrapper_get("default_remote")
|
|
242
|
-
branch = self.branch_combo.currentText()
|
|
243
|
-
|
|
244
|
-
def after(res, err):
|
|
245
|
-
if err:
|
|
246
|
-
self._error(self.language_wrapper_get("err_pull"), err)
|
|
247
|
-
else:
|
|
248
|
-
self._load_commits_async()
|
|
249
|
-
self._info(self.language_wrapper_get("info_pull_title"), str(res))
|
|
250
|
-
|
|
251
|
-
self.worker = Worker(self.git.pull, remote, branch)
|
|
252
|
-
self.worker.done.connect(after)
|
|
253
|
-
self.worker.start()
|
|
254
|
-
|
|
255
|
-
def on_push(self):
|
|
256
|
-
remote = self.remote_combo.currentText() or self.language_wrapper_get("default_remote")
|
|
257
|
-
branch = self.branch_combo.currentText()
|
|
258
|
-
|
|
259
|
-
def after(res, err):
|
|
260
|
-
if err:
|
|
261
|
-
self._error(self.language_wrapper_get("err_push"), err)
|
|
262
|
-
else:
|
|
263
|
-
self._info(self.language_wrapper_get("info_push_title"), str(res))
|
|
264
|
-
|
|
265
|
-
self.worker = Worker(self.git.push, remote, branch)
|
|
266
|
-
self.worker.done.connect(after)
|
|
267
|
-
self.worker.start()
|
|
268
|
-
|
|
269
|
-
def _on_clone_remote_repo(self):
|
|
270
|
-
"""
|
|
271
|
-
UI handler for cloning a remote repository.
|
|
272
|
-
"""
|
|
273
|
-
url, ok = QInputDialog.getText(self,
|
|
274
|
-
self.language_wrapper_get("dialog_clone_title"),
|
|
275
|
-
self.language_wrapper_get("dialog_clone_prompt"))
|
|
276
|
-
if not ok or not url.strip():
|
|
277
|
-
return
|
|
278
|
-
|
|
279
|
-
local_dir = QFileDialog.getExistingDirectory(self, self.language_wrapper_get("dialog_select_folder"))
|
|
280
|
-
if not local_dir:
|
|
281
|
-
return
|
|
282
|
-
|
|
283
|
-
try:
|
|
284
|
-
repo_path = self.clone_handler.clone_repo(url.strip(), local_dir)
|
|
285
|
-
self.git.open_repo(repo_path)
|
|
286
|
-
QMessageBox.information(self,
|
|
287
|
-
self.language_wrapper_get("info_clone_success_title"),
|
|
288
|
-
f"{self.language_wrapper_get('info_clone_success_msg')} {repo_path}")
|
|
289
|
-
except Exception as e:
|
|
290
|
-
QMessageBox.critical(self, self.language_wrapper_get("err_clone_failed_title"), str(e))
|
|
291
|
-
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|