Skip to content

Commit

Permalink
VCS: Add push, pull, fetch and improved diff view to VCS UI
Browse files Browse the repository at this point in the history
This commit was created by merging the commits presented in #39255 for
the GSoC 2020 VCS Improvement project

VCS: Make EditorVCSInterface store less amount of internal state

VCS: Add force push checkbox + more frequent VCS updates

Add force push checkbox in the Commit dock. Also add some missing
opportunities for checking the VCS state again on from UI inputs

VCS: Fix script contents not being updated on merge conflict

VCS: Add branch creation VCS interface calls

VCS: Add VCS remote creation and remote selection menus

VCS: Show more commit information + Fix truncated commit offsets

VCS: Make VCS less noisy + Fix diff view refreshes

VCS: Fix mismatched argument names in VCS helpers

VCS: Add SSH transport support for remote operations

Also, moves the editor's VCS settings registrations to
project_settings.cpp and editor_settings.cpp

VCS: Change TTR() to vformat() for branch and remote removal text

VCS: Add VCS branch icon instead of using Tree node icon

Co-authored-by: @ChronicallySerious
  • Loading branch information
Janglee123 authored and twaritwaikar committed Dec 1, 2021
1 parent fddbbf4 commit 0b327eb
Show file tree
Hide file tree
Showing 15 changed files with 1,919 additions and 475 deletions.
3 changes: 3 additions & 0 deletions core/project_settings.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1061,6 +1061,9 @@ ProjectSettings::ProjectSettings() {
GLOBAL_DEF("editor/script_templates_search_path", "res://script_templates");
custom_prop_info["editor/script_templates_search_path"] = PropertyInfo(Variant::STRING, "editor/script_templates_search_path", PROPERTY_HINT_DIR);

GLOBAL_DEF("editor/version_control/autoload_on_startup", false);
GLOBAL_DEF("editor/version_control/plugin_name", "");

action = Dictionary();
action["deadzone"] = Variant(0.5f);
events = Array();
Expand Down
260 changes: 218 additions & 42 deletions doc/classes/EditorVCSInterface.xml

Large diffs are not rendered by default.

6 changes: 6 additions & 0 deletions doc/classes/ProjectSettings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -517,6 +517,12 @@
<member name="editor/search_in_file_extensions" type="PoolStringArray" setter="" getter="" default="PoolStringArray( &quot;gd&quot;, &quot;gdshader&quot;, &quot;shader&quot; )">
Text-based file extensions to include in the script editor's "Find in Files" feature. You can add e.g. [code]tscn[/code] if you wish to also parse your scene files, especially if you use built-in scripts which are serialized in the scene files.
</member>
<member name="editor/version_control/autoload_on_startup" type="bool" setter="" getter="" default="false">
Load the previously opened VCS plugin when the editor starts up. This is set to [code]true[/code] whenever a new VCS plugin is initialized.
</member>
<member name="editor/version_control/plugin_name" type="String" setter="" getter="" default="&quot;&quot;">
Last loaded VCS plugin name. Used to autoload the plugin when the editor starts up.
</member>
<member name="gui/common/default_scroll_deadzone" type="int" setter="" getter="" default="0">
Default value for [member ScrollContainer.scroll_deadzone], which will be used for all [ScrollContainer]s unless overridden.
</member>
Expand Down
6 changes: 6 additions & 0 deletions doc/classes/ScriptEditor.xml
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,12 @@
Opens the script create dialog. The script will extend [code]base_name[/code]. The file extension can be omitted from [code]base_path[/code]. It will be added based on the selected scripting language.
</description>
</method>
<method name="reload_scripts">
<return type="void" />
<description>
Reload all currently opened scripts from disk in case the file contents are newer.
</description>
</method>
</methods>
<signals>
<signal name="editor_script_changed">
Expand Down
5 changes: 5 additions & 0 deletions editor/editor_node.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5932,6 +5932,11 @@ EditorNode::EditorNode() {
EDITOR_DEF("interface/inspector/default_color_picker_mode", 0);
EditorSettings::get_singleton()->add_property_hint(PropertyInfo(Variant::INT, "interface/inspector/default_color_picker_mode", PROPERTY_HINT_ENUM, "RGB,HSV,RAW", PROPERTY_USAGE_DEFAULT));
EDITOR_DEF("run/auto_save/save_before_running", true);
EDITOR_DEF("version_control/username", "");
EDITOR_DEF("version_control/ssh_public_key_path", "");
EditorSettings::get_singleton()->add_property_hint(PropertyInfo(Variant::STRING, "version_control/ssh_public_key_path", PROPERTY_HINT_GLOBAL_FILE));
EDITOR_DEF("version_control/ssh_private_key_path", "");
EditorSettings::get_singleton()->add_property_hint(PropertyInfo(Variant::STRING, "version_control/ssh_private_key_path", PROPERTY_HINT_GLOBAL_FILE));

theme_base = memnew(Control);
add_child(theme_base);
Expand Down
Loading

0 comments on commit 0b327eb

Please sign in to comment.