Giter VIP home page Giter VIP logo

uegitplugin's Introduction

Unreal Engine Git Plugin

This is a refactor of the Git LFS 2 plugin by SRombauts, with lessons learned from production that include performance optimizations, new features and workflow improvements.

Features

  • Multi-threaded locking/unlocking, greatly improving performance when locking/unlocking many files
  • Remote lock status only checked when needed
  • Added local lock cache for speeding up local operations
  • Improved performance of repository file traversal
  • Improved initialization logic
  • Generally improved wording and UX throughout
  • Greatly improved pull within editor
    • Only refreshes changed files, which prevents crashes in large projects
    • Uses rebase workflow to properly manage local work
  • Added support for Status Branches, which check outdated files vs. remote across multiple branches
  • Periodic background remote refresh to keep remote file statuses up to date
  • Automatic handling of pushing from an outdated local copy
  • Optimized status updates for successful operations
  • Manage both lockable (assets, maps) and non-lockable files (configs, project file) in editor
  • Improved status display in editor
  • Integration with PBSync binaries syncing
  • General improvements to performance and memory usage

Installation

Either install this into your project's Plugins/ folder, or if you would like to install to the engine, rename Engine/Plugins/Developer/GitSourceControl.uplugin to Engine/Plugins/Developer/GitSourceControl.uplugin.disabled and then install this plugin to the Engine/Plugins folder.

Note about .gitattributes and .gitignore

This plugin requires explicit file attributes for *.umap and *.uasset, rather than other approaches of using wildcards for the content folder (Content/**).

See our own .gitattributes for an example.

You may also want to check out our robust .gitignore too.

Note about authentication

We would highly recommend using HTTPS authentication for your Git repo.

This allows a single credential path to be used, with the robust and fast HTTPS support in LFS.

With Git Credential Manager, authenticating with HTTPS is also much easier, with a GUI available to authenticate with any Git provider.

Note about Unreal configuration

Required

  • The plugin makes the assumption that files are always explicitly added. We made this decision because it is beneficial for performance and our workflows. In Config/DefaultEditorPerProjectUserSettings.ini
[/Script/UnrealEd.EditorLoadingSavingSettings]
bSCCAutoAddNewFiles=False

Recommended

  • As a general revision control usability improvement, you can enable new checkout features in Config/DefaultEditorPerProjectUserSettings.ini. To enable auto-checkout on modification, which is great for OFPA and other workflows (but requires user attention to excessive locking of content):
[/Script/UnrealEd.EditorLoadingSavingSettings]
bAutomaticallyCheckoutOnAssetModification=True
bPromptForCheckoutOnAssetModification=False
  • OR, to enable auto-prompt on modification, which is a bit more upfront/intrusive in user flows, but more conservative with locking, flip the settings:
[/Script/UnrealEd.EditorLoadingSavingSettings]
bAutomaticallyCheckoutOnAssetModification=False
bPromptForCheckoutOnAssetModification=True

  • As another general usability improvement, you can set the editor to load any checked out packages for faster loading. In Config/DefaultEditorPerProjectUserSettings.ini:
[/Script/UnrealEd.EditorPerProjectUserSettings]
bAutoloadCheckedOutPackages=True

  • In Config/DefaultEngine.ini you can set this option to 1 to disable a feature that is unnecessary for Git (for performance):
[SystemSettingsEditor]
r.Editor.SkipSourceControlCheckForEditablePackages=1

Status Branches - Required Code Changes

Epic Games added Status Branches in 4.20, and this plugin has implemented support for them. See Workflow on Fortnite for more information. Here is an example of how you may apply it to your own game.

  1. Make an UUnrealEdEngine subclass, preferrably in an editor only module, or guarded by WITH_EDITOR.
  2. Add the following:
#include "ISourceControlModule.h"
#include "ISourceControlProvider.h"

void UMyEdEngine::Init(IEngineLoop* InEngineLoop)
{
	Super::Init(InEngineLoop);

	// Register state branches
	const ISourceControlModule& SourceControlModule = ISourceControlModule::Get();
	{
		ISourceControlProvider& SourceControlProvider = SourceControlModule.GetProvider();
		// Order matters. Lower values are lower in the hierarchy, i.e., changes from higher branches get automatically merged down.
		// (Automatic merging requires an appropriately configured CI pipeline)
		// With this paradigm, the higher the branch is, the stabler it is, and has changes manually promoted up.
		const TArray<FString> Branches {"origin/develop", "origin/promoted"};
		SourceControlProvider.RegisterStateBranches(Branches, TEXT("Content"));
	}
}
  1. Set to use the editor engine in Config/DefaultEngine.ini (make sure the class name is MyUnrealEdEngine for a class called UMyUnrealEdEngine!):
[/Script/Engine.Engine]
UnrealEdEngine=/Script/MyModule.MyEdEngine
  1. In this example, origin/promoted is the highest tested branch. Any changes in this branch are asset changes that do not need testing, and get automatically merged down to origin/develop. This may be extended to involve multiple branches, like origin/trunk, origin/main, or whatever you may prefer, where changes may be cascaded from most-stable to least-stable automatically. With this paradigm, changes from less-stable branches are manually promoted to more-stable branches after a merge review.
    NOTE: The second argument in RegisterStateBranches is Perforce specific and is ignored, but is meant to point to the relative content path.

  2. If you decide to implement the status branch code in a editor-only module, ensure the loading phase in the editor module is set to Default in your .uproject settings, like so: (Otherwise, the editor will likely have difficulty finding your subclass'd UUnrealEdEngine class.)

		{
			"Name": "MyTestProjectEditor",
			"Type": "Editor",
			"LoadingPhase": "Default"
		}

Status Branches - Conceptual Overview

This feature helps ensure you're not locking and modifying files that are out-of-date.

If a user is on any branch, regardless if it's tracking a branch included in the 'status branch' list, they will be unable to checkout files that have more recent changes on the remote server than they have on the local branch, provided those changes are in a branch in the 'status branch' list.

  • If the remote branch with the changes is not in the status branch list, the user will not be notified of remote changes.
  • If the user makes changes to a local branch and switches to another local branch, the user will not be notified of their own changes to the other branch, regardless if it's in the 'status branch' list or not (this feature only checks remote branches!)
  • If the user is tracking a remote branch that is in the status branch list, they will be unable to lock stale files (files that are changed up-stream).

Status Branch Overview

Note:

It's important to only release file locks after changes have been pushed to the server. The system has no way to determine that there are local changes to a file, so if you modify a locked file it's imperative that you push the changes to a remote branch included in the 'status branch' list so other users can see those changes and avoid modifying a stale file. Otherwise, you'll want to keep the file locked!

Additionally, if you're switching back and forth between two or more branches locally you'll need to keep track of what branch you've made changes to locked files, as the system will not prevent you from modifying the same locked file on multiple different branches!

Real-world example of the 'status branch' feature:

  • The user has checked out the develop branch, but there is an up-stream change on origin/develop for FirstPersonProjectileMaterial, indicated with the yellow exclamation mark.
  • There are also newer upstream changes on the promoted branch, indicated with the red exclamation mark. (NOTE: The plugin does not currently report the branch name the changes are on.)

Status Branch Feature in Action

General In-Editor Usage

Connecting to revision control:

Generally speaking, the field next to Uses Git LFS 2 File Locking workflow should match your Git server's User Name, like so: (If you find that the checkmark turns blue shortly after checking out a file, then the LFS name is incorrect, update it to the name it says checked out the file)

Connecting to Revision Control

Checking out (locking) one or more assets:

You can lock individual files or you can hold shift to select and lock multiple at once, which can be quite a bit faster than locking them individually.

Checking out Multiple Assets

Unlocking one or more un-changed assets:

You can unlock individual files or you can hold shift to select and unlock multiple at once, which can be quite a bit faster than unlocking them individually.

Checking out Multiple Assets

Locking every asset within a folder:

You can lock every file in a folder by right clicking on the folder and clicking Check Out.

Lock every asset in a folder

Viewing locks:

View the owner of a file lock simply by hovering over the asset icon. Your locked files have a red check-mark, other user's locks will show up with a blue checkmark.

Viewing file locks

Pulling latest from within the editor:

You can pull the latest changes from your currently checked-out branch within the editor. This doesn't always work smoothly, but effort has been made to improve this process. It is still recommended to always save changes before doing this, however.

Pulling latest

Submitting changes up-stream:

Submit to revision control will create a local commit, push it, and release your file lock. (While you cannot check out branches within the plugin, it is fully branch-aware! In this scenario, the user has checked out the develop branch, so their change is pushed to origin/develop.)

Submitting to revision control

Additional Resources

You can learn more about how we set up our Git repository at the PBCore wiki.

uegitplugin's People

Contributors

ameaninglessname avatar as3mbus avatar bcottdev avatar blackmatov avatar brifsttar avatar butterscup avatar ccarvalheiro avatar crevetor avatar dyanikoglu avatar gellule avatar gitter-badger avatar jeffason avatar kahouteiri avatar kristofmorva avatar mastercoms avatar meetmarkelov avatar mekucube avatar michaelgold avatar michaeljcole avatar r3dg avatar rpav avatar rweber89 avatar sinbad avatar sixze avatar srombauts avatar theemidee avatar thmhoag avatar tom-miclos avatar twentypast4 avatar web-eworks avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

uegitplugin's Issues

Slow performance on checking out assets

Hello,

I was reading through the feature list, specifically this one:
"Multi-threaded locking/unlocking, greatly improving performance when locking/unlocking many files"

I've tried checking out with a single file as well as a dozen and the timing for me spans anywhere between 30 seconds to over a minute.

Is there something that I need to adjust or is this already using multithreaded processing?

Thanks and looking forward to hearing from you.

Cannot create an asset where another asset with the same name was previously deleted

Hello, great plugin!

I've found an issue that can be easily reproduced in both 4.27 and 5.0.

  1. In Unreal, create any asset (e.g. a material: "NewMaterial") at any content location.
  2. Commit the asset.
  3. Delete the asset. This should work fine and remove the asset from disk, and Git will detect it as a removal.
  4. Finally, create an asset in the same place with the same name. (e.g. "NewMaterial" again)

It appears to run a command that doesn't work, resulting in error dialog:

Git command failed. Please check your connection and try again, or check the output log for more information.

followed by:

Failed to revert package which was marked for delete.

and the asset then fails to construct.

As I understand it, the command that is failing seems to be this rm while pre-construct checks are being run for the asset:

else
{
if (MissingFiles.Num() > 0)
{
// "Added" files that have been deleted needs to be removed from source control
InCommand.bCommandSuccessful &= GitSourceControlUtils::RunCommand(TEXT("rm"), InCommand.PathToGitBinary, InCommand.PathToRepositoryRoot, FGitSourceControlModule::GetEmptyStringArray(), MissingFiles, InCommand.ResultInfo.InfoMessages, InCommand.ResultInfo.ErrorMessages);
}
if (AllExistingFiles.Num() > 0)

There appears to be a revert command that is attempting to rm the file, but the file does not exist because it's not created yet, so it fails.

It seems I can work around this by removing the rm command entirely, though I'm not sure what else I might be breaking by doing this.

Any help appreciated, thanks!

Unlocking doesn't work

UE version: 5.0.3
Plugin version: 3.09 (also with 3.08)
Git repo: Azure Devops

I cannot seem to get unlocking working correctly. Locks seem to work as intended and shows accordingly in Git Bash, but Reverting/Submitting within the Editor does not unlock the file. I have to unlock manually using Git Bash.

image

Corrupt data in username field?

The first time you select Git LFS 2 as source control it will auto-populate the username with corrupt leading characters.

If you edit the username and access git the username then remains non-corrupt.

Reproduce:

Clone a project without UEGitPlugin plugin from a repository
Add UEGitPlugin
Select Tools -> Connect to Source Control->Git LFS 2

At this point you may see corrupt characters before the username (field bellow E-mail)

This will only happen the first time, once you have edited the username field it remains non corrupt

Missing include..

I get a compile error when I try to use the UEGitPlugin with UE5. It looks like you are missing an include in GitSourceControlMenu.h. It works once I add this:

#if ENGINE_MAJOR_VERSION == 5
#include "ToolMenuSection.h"
#endif

Repository root should be project root

I have a UE pixel streaming project which consists of a UE project but also a web page that has an iframe on it that presents the UE pixel stream. We setup the project directory at the top level to have a /UE and /Web subfolder because these two have to stay in sync. However now that the UE project is not at the top level this plugin stops working properly. What happens is this: UE checkout is LFS locking properly and all users see a lock update pretty fast. When Submitting change we provide the checkin comment but then the status dialog says "Reverting Source Control", not the normal message. This takes a while so I think its actually doing a commit/push but then it reports Success (but no Commit message) and that commit never appears on the remote repo. The files are unlocked and remain locally changed but no updates are on the remote repo.
Developers see Success and think they've checked in files but really it successfully did nothing.

Unlock doesn't happen

HI,
If you Check Out a file by right-clicking on it, then you revert - often it works fine ("git lfs unlock" does happen).

When I go to modify the file with bPromptForCheckoutOnAssetModification enabled, it is locked correctly (looking at "git lfs locks"), but when I try to revert it, it does revert but fails to unlock.

It still has a yellow checkmark, and "git lfs locks" still reports it as locked, but when GitSourceControlUtils::GetLockedFiles is called inside Revert, it is not counted as locked and isn’t unlocked. So I’m stuck with a locked file.

Also, after that the “Revert” button when you right-click the asset just disappears.
And so I get a file that is locked, that has a yellow checkmark, but there is no way to unlock it.

Also, sometimes when I just Check Out the files on my own, the revert then fails too, and the same “locked, with yellow checkmark, but no Revert button” situation happens as well.

When I try to "Submit Content", the lock also remains (which is probably the same issue because of the GitSourceControlUtils::GetLockedFiles behavior)

Also, when I Check Out the file from a prompt while modifying it, this error sometimes appears:
image

I don’t have a Windows machine so I’m unsure if this is a general issue, or a Mac one. Still, it becomes impossible to use the plugin

Unreal version: 5.0.2
MacOS: 12.3
Plugin version: 3.04

The git repository was created beforehand, without the setup inside the plugin.

Initially, mac version didn’t compile, but fixes similar to these #42 helped

File doesnt save when submited and engine is restarted [UE5]

When i submit something through Source Control with UE5 with the plugin and then restart the engine i cant save the submitet file again. Everything else works just fine. Idk if its a problem that the .gitattributes file maybe gets ignored?

grafik

No way to unlock a file?

Screenshot 2022-11-03 154737

  1. The revert option only appears if the local file is modified
  2. Reverting a file does not unlock it

Obviously I can unlock through command line, but this seems like a fairly basic feature that is either missing or not working properly.

Plugin version: 3.08

Source control is disabled even after enabling it

When I enable source control and accept settings using existing git repository I don't get any errors with that operation. However, I cannot see any symbols in Content Drawer. If I choose again Connect to Source Control from the menu it says that Provider is None and source control is disabled.

I have also tried to restart the editor after choosing Git LFS 2. The results are the same. It always says that source control is disabled. I checked that SourceControlSettings file has been updated with the following contents:

[SourceControl.SourceControlSettings]
Provider=Git LFS 2

[GitSourceControl.GitSourceControlSettings]
BinaryPath=C:\Program Files\Git\bin\git.exe
UsingGitLfsLocking=True
LfsUserName=My name

I found that after enabling the Source Control I can open View Changelists from the menu. However, it generates following error to the log:

Operation 'UpdateChangelistsStatus' not supported by source control provider 'Git LFS 2'

I am using Unreal Engine 5.0.3 in Windows 11.

No way to continue rebase on conflict

You ca create conflict by naming assets in a same way
In this case user can remove their conflicting files with reset and only button missing is "continue rebase"

Unreal 5 source control not working correctly?

Hello!

Just tried the most recent commit in a fresh Unreal 5 file with the latest UE5 EA2 Build. It kinda works but there are some weird things. For example I can't update the project within the editor. There isn't such a field. Also when I save an asset, Unreal doesn't ask me whether I want to check it out. It seems to check out the asset in the background but I can only see that it is checked if I right-click on the asset and press on Refresh.

Is this a plugin issue or a general UE5 source control issue?

SSH required for plugin to function?

We've onboarded several new devs recently that attempted to authenticate using PAT over HTTPS rather than SSH. The plugin would fail with errors like this:
image

Our workaround is to have them switch their remote to SSH and authenticate with a private key pair. Is this a known issue or any ideas what we're doing wrong?

Can't "checkin/revert" ULevel assets.

Hey there,

whenever I edit a ULevel, save, checkout and later commit, it won't be "checked in" again.

That also happens with other UAssets, however ULevel's also refuse to revert:

LogSourceControl: Warning: This operation could not complete on the following map or external packages, please unload them before retrying : /Game/XYZ/Maps/TestMaps/Enemies, /Game/XYZ/Maps/Prototype/Prototype

How do I unlock these again? :D

Register status branches

Hi,
i try to implement RegisterStateBranches(), but won't pass if (SourceControlModule.IsEnabled()) condition, actually.

On UE_LOG(LogTemp, Warning, TEXT("SCModule is enabled status: %s"), ( SourceControlModule.IsEnabled() ? TEXT("true") : TEXT("false") )); i'm getting in OutputLog LogTemp: Warning: SCModule is enabled status: false.
But at the same time SourceControlModule.GetProvider().GetName() is returning Git.

I put it into custom UnrealEd module like so

#include "UEGitTestProjectEngine.h"
#include "ISourceControlModule.h"
#include "ISourceControlProvider.h"

UUEGitTestProjectEngine::UUEGitTestProjectEngine(const FObjectInitializer& ObjectInitializer)
	: Super(ObjectInitializer)
{
}
void UUEGitTestProjectEngine::Init(IEngineLoop* InEngineLoop)
{
	Super::Init(InEngineLoop);
 
	// Update source control settings and register in case the provider changes
	UpdateSourceControlSettings();
	ISourceControlModule::Get().RegisterProviderChanged(FSourceControlProviderChanged::FDelegate::CreateLambda([this](ISourceControlProvider& OldProvider, ISourceControlProvider& NewProvider) {
		if (NewProvider.GetName() == FName("Git"))
		{
			this->UpdateSourceControlSettings();
		}
	}));
}
 
void UUEGitTestProjectEngine::UpdateSourceControlSettings()
{
	// Register state branches
	ISourceControlModule& SourceControlModule = ISourceControlModule::Get();
	UE_LOG(LogTemp, Warning, TEXT("Source Control Module is enabled status: %s"), ( SourceControlModule.IsEnabled() ? TEXT("true") : TEXT("false") ));
	UE_LOG(LogTemp, Warning, TEXT("Source Control Provider name: %s"), ( *(SourceControlModule.GetProvider().GetName()).ToString() ));
	ISourceControlProvider& SourceControlProviderTest = SourceControlModule.GetProvider();
	if (SourceControlModule.IsEnabled())
	{
		ISourceControlProvider& SourceControlProvider = SourceControlModule.GetProvider();
	 	// Order matters. Lower values are lower in the hierarchy, i.e., changes from higher branches get automatically merged down.
	 	// (Automatic merging requires an appropriately configured CI pipeline)
	 	// With this paradigm, the higher the branch is, the stabler it is, and has changes manually promoted up.
	 	const TArray<FString> Branches {"origin/develop", "origin/main"};
	 	SourceControlProvider.RegisterStateBranches(Branches, TEXT("Content"));
	}        
}

i am seeking for advice what is going wrong here, is it something in the UnrealEd module (like loading order, so it would initialize ISourceControlModule later) or other places?

[UE5P1] Plug in causing dumps when saving assets

Happens around each 10-15 saves (just saving the asset)

`Unhandled Exception: EXCEPTION_ACCESS_VIOLATION reading address 0xffffffffffffffff

UnrealEditor_Core
UnrealEditor_Core
UnrealEditor_Core
UnrealEditor_Core
UnrealEditor_Core
UnrealEditor_Core
UnrealEditor_Core
UnrealEditor_Core
UnrealEditor_SourceControl
UnrealEditor_GitSourceControl_Win64_DebugGame!FGitSourceControlProvider::GetState() [U:\Unreal Projects\XXX\Plugins\UEGitPlugin-ue5\Source\GitSourceControl\Private\GitSourceControlProvider.cpp:268]
UnrealEditor_SourceControl
UnrealEditor_ContentBrowser
UnrealEditor_ContentBrowser
UnrealEditor_GitSourceControl_Win64_DebugGame!TMulticastDelegate<void __cdecl(void),FDefaultDelegateUserPolicy>::Broadcast() [U:\UE_5.0\Engine\Source\Runtime\Core\Public\Delegates\DelegateSignatureImpl.inl:967]
UnrealEditor_GitSourceControl_Win64_DebugGame!FGitSourceControlProvider::Tick() [U:\Unreal Projects\XXX\Plugins\UEGitPlugin-ue5\Source\GitSourceControl\Private\GitSourceControlProvider.cpp:553]
UnrealEditor_GitSourceControl_Win64_DebugGame!FGitSourceControlProvider::ExecuteSynchronousCommand() [U:\Unreal Projects\XXX\Plugins\UEGitPlugin-ue5\Source\GitSourceControl\Private\GitSourceControlProvider.cpp:615]
UnrealEditor_GitSourceControl_Win64_DebugGame!FGitSourceControlProvider::Execute() [U:\Unreal Projects\XXX\Plugins\UEGitPlugin-ue5\Source\GitSourceControl\Private\GitSourceControlProvider.cpp:378]`

Git LFS not up to date

Hi!

Really good work with your refactoring and the improved features!

Regarding the LFS Binary, is there a reason for having an old version of it in the repository instead of using the most recent ones (I believe version 3 is already out)?

Thanks!

Crash during start up can't LoadModule

Hello. Using latest release 3.06, and unreal 5.0.2 me and my coworker are getting crashing randomly in unreal during the initial loading of the plugin. When it happens it seems to happen a few times in a row then go away.

The crash is within ModuleManager.cpp, in LoadModuleCheck. When the plugin attempts to start handing the branch check.

UnrealEditor-Core.dll!FModuleManager::LoadModuleChecked(const FName InModuleName) Line 388 C++
UnrealEditor-GitSourceControl-Win64-DebugGame.dll!FGitSourceControlModule::Get() Line 118 C++
UnrealEditor-GitSourceControl-Win64-DebugGame.dll!GitSourceControlUtils::GetBranchName(const FString & InPathToGitBinary, const FString & InRepositoryRoot, FString & OutBranchName) Line 523 C++
UnrealEditor-GitSourceControl-Win64-DebugGame.dll!FGitSourceControlProvider::CheckRepositoryStatus::__l2::void (void)::__l2::() Line 114 C++
UnrealEditor-GitSourceControl-Win64-DebugGame.dll!FGitSourceControlProvider::CheckRepositoryStatus::__l2::() Line 139 C++
UnrealEditor-GitSourceControl-Win64-DebugGame.dll!UE::Core::Private::Function::TFunctionRefCaller<void (void),void __cdecl(void)>::Call(void * Obj) Line 549 C++

Can't compile plugin on Preview1

Hi,

Please find the list of issues with UE P1 using the latest version of the plugin:

image

This is a brand new project with just the plugin inside.

Some Module Manager crash

Assertion failed: Module [File:D:\build\++UE5\Sync\Engine\Source\Runtime\Core\Private\Modules\ModuleManager.cpp] [Line: 393] GitSourceControl

UnrealEditor_Core
UnrealEditor_GitSourceControl!GitSourceControlUtils::ParseFileStatusResult() [G:\Projects\ZHA\Plugins\UEGitPlugin\Source\GitSourceControl\Private\GitSourceControlUtils.cpp:1065]
UnrealEditor_GitSourceControl!GitSourceControlUtils::ParseStatusResults() [G:\Projects\ZHA\Plugins\UEGitPlugin\Source\GitSourceControl\Private\GitSourceControlUtils.cpp:1213]
UnrealEditor_GitSourceControl!GitSourceControlUtils::RunUpdateStatus() [G:\Projects\ZHA\Plugins\UEGitPlugin\Source\GitSourceControl\Private\GitSourceControlUtils.cpp:1443]
UnrealEditor_GitSourceControl!FGitFetchWorker::Execute() [G:\Projects\ZHA\Plugins\UEGitPlugin\Source\GitSourceControl\Private\GitSourceControlOperations.cpp:689]
UnrealEditor_GitSourceControl!FGitSourceControlCommand::DoThreadedWork() [G:\Projects\ZHA\Plugins\UEGitPlugin\Source\GitSourceControl\Private\GitSourceControlCommand.cpp:46]

Plugin says i have to pull outside the editor and much other issues

When i try to pull (i also had things that aren't submitted) a windows error message comes up with something like i have to pull outside the editor or a Unreal error with "Sync operation failed!"

Also when trying to submit to source control the Diff Against Depot never really works maybe i need to pull first idk?

And this is grayed out for some reason

Unable to lock files

I am unable to see a "Check Out" button when right clicking, nor am I able to see the "Checked out by" text when I manually lock a file in the terminal.

I'm running UE 4.27.2 with the release branch of this.

No Assets To Check In

So am trying to figure this one out, but it seems like I get the current behavior:

  1. Git Attributes are properly configured
  2. I checkout a material uasset
  3. It shows the red check mark (great)
  4. I save the file, go back to "submit" the file
  5. It says there's no files to submit, it shows the file locked... by me, I can't unlock it from the editor, only from the command line

Am I doing something wrong here?

Adding extracted folder to /Plugins causes UE to crash on open

I cannot install this plugin. I receive this error each time:

image
Alt text description: A Windows message box with the following text and an OK button.
Plugin 'GitSourceControl' failed to load because 'GitSourceControl' could not be found. Please ensure the plugin is properly installed, otherwise consider disabling the plugin for this project.

I am using the latest release, v3.0.3, and a stock install of UE 4.27.2 fresh from the Epic Games client.

I tried both installation methods:

  1. I tried pasting the unzipped folder into the /Plugins folder of my project. I could open the project selection window, but when I selected my project, I got that error message.
  2. I moved the unzipped folder to the /Engine/Plugins folder of my UE4.27 installation and renamed the .uplugin in /Engine/Plugins/Developer/GitSourceControl to .disabled, as stated in instructions. Afterwards, I could not even open the engine itself without receiving that error message.

Any guidance? Thanks, and let me know if I should provide any more info.

difference from built-in git plugin

what is the difference from the currently builtin git plugin? screenshots look the same, although I'm not 100% the built-in supports file locking. Is this plugin working with UE4.27?

Can't package project with Source Control enabled

On Unreal 4.27.2 binary when I try to package the project with Shipping configuration while Source Control is enabled I get the error bellow. If I disable Source Control the process works as expected. Thank you.

UATHelper: Packaging (Windows (64-bit)): LogWindows: Error: begin: stack for UAT UATHelper: Packaging (Windows (64-bit)): LogWindows: Error: === Critical error: === UATHelper: Packaging (Windows (64-bit)): LogWindows: Error: UATHelper: Packaging (Windows (64-bit)): LogWindows: Error: Assertion failed: (!ModuleInfo->bWasUnloadedAtShutdown) [File:D:/Build/++UE4/Sync/Engine/Source/Runtime/Core/Private/Modules/ModuleManager.cpp] [Line: 416] UATHelper: Packaging (Windows (64-bit)): LogWindows: Error: Attempted to load module 'GitSourceControl' that was already unloaded at shutdown. FModuleManager::LoadModule() was called to load a module that was previously loaded, and was unloaded at shutdown time. If this assert goes off, your trying to load a module during the shutdown phase that was alre ady cleaned up. The easiest way to fix this is to change your code to query for an already-loaded module instead of trying to load it directly. UATHelper: Packaging (Windows (64-bit)): LogWindows: Error: UATHelper: Packaging (Windows (64-bit)): LogWindows: Error: UATHelper: Packaging (Windows (64-bit)): LogWindows: Error: [Callstack] 0x00007ff96e3e466c KERNELBASE.dll!UnknownFunction [] UATHelper: Packaging (Windows (64-bit)): LogWindows: Error: [Callstack] 0x00007ff915b60216 UE4Editor-Core.dll!UnknownFunction [] UATHelper: Packaging (Windows (64-bit)): LogWindows: Error: [Callstack] 0x00007ff915b64218 UE4Editor-Core.dll!UnknownFunction [] UATHelper: Packaging (Windows (64-bit)): LogWindows: Error: [Callstack] 0x00007ff91588242d UE4Editor-Core.dll!UnknownFunction [] UATHelper: Packaging (Windows (64-bit)): LogWindows: Error: [Callstack] 0x00007ff9157d6a45 UE4Editor-Core.dll!UnknownFunction [] UATHelper: Packaging (Windows (64-bit)): LogWindows: Error: [Callstack] 0x00007ff9157d80a0 UE4Editor-Core.dll!UnknownFunction [] UATHelper: Packaging (Windows (64-bit)): LogWindows: Error: [Callstack] 0x00007ff915e94739 UE4Editor-Core.dll!UnknownFunction [] UATHelper: Packaging (Windows (64-bit)): LogWindows: Error: [Callstack] 0x00007ff9158e0e20 UE4Editor-Core.dll!UnknownFunction [] UATHelper: Packaging (Windows (64-bit)): LogWindows: Error: [Callstack] 0x00007ff9158e06a9 UE4Editor-Core.dll!UnknownFunction [] UATHelper: Packaging (Windows (64-bit)): LogWindows: Error: [Callstack] 0x00007ff8dc8bea04 UE4Editor-GitSourceControl.dll!GitSourceControlUtils::UpdateCachedStates() [F:\Projects\Unclaimed\Plugins\UEGitPlugin\Source\GitSourceControl\Private\GitSourceControlUtils.cpp:1847] UATHelper: Packaging (Windows (64-bit)): LogWindows: Error: [Callstack] 0x00007ff8dc88753a UE4Editor-GitSourceControl.dll!<lambda_61b3dae1a6881474880cc6f05f6b3f09>::operator()() [F:\Projects\Unclaimed\Plugins\UEGitPlugin\Source\GitSourceControl\Private\GitSourceControlProvider.cpp:129] UATHelper: Packaging (Windows (64-bit)): LogWindows: Error: [Callstack] 0x00007ff9155cf045 UE4Editor-Core.dll!UnknownFunction [] UATHelper: Packaging (Windows (64-bit)): LogWindows: Error: [Callstack] 0x00007ff9155e2398 UE4Editor-Core.dll!UnknownFunction [] UATHelper: Packaging (Windows (64-bit)): LogWindows: Error: [Callstack] 0x00007ff9155e27ce UE4Editor-Core.dll!UnknownFunction [] UATHelper: Packaging (Windows (64-bit)): LogWindows: Error: [Callstack] 0x00007ff9155f40bd UE4Editor-Core.dll!UnknownFunction [] UATHelper: Packaging (Windows (64-bit)): LogWindows: Error: [Callstack] 0x00007ff915978dbd UE4Editor-Core.dll!UnknownFunction [] UATHelper: Packaging (Windows (64-bit)): LogWindows: Error: [Callstack] 0x00007ff91593058a UE4Editor-Core.dll!UnknownFunction [] UATHelper: Packaging (Windows (64-bit)): LogWindows: Error: [Callstack] 0x00007ff915970424 UE4Editor-Core.dll!UnknownFunction [] UATHelper: Packaging (Windows (64-bit)): LogWindows: Error: [Callstack] 0x00007ff7fe77051d UE4Editor-Cmd.exe!UnknownFunction [] UATHelper: Packaging (Windows (64-bit)): LogWindows: Error: [Callstack] 0x00007ff7fe771063 UE4Editor-Cmd.exe!UnknownFunction [] UATHelper: Packaging (Windows (64-bit)): LogWindows: Error: [Callstack] 0x00007ff7fe7710ba UE4Editor-Cmd.exe!UnknownFunction [] UATHelper: Packaging (Windows (64-bit)): LogWindows: Error: [Callstack] 0x00007ff7fe7740dd UE4Editor-Cmd.exe!UnknownFunction [] UATHelper: Packaging (Windows (64-bit)): LogWindows: Error: [Callstack] 0x00007ff7fe785984 UE4Editor-Cmd.exe!UnknownFunction [] UATHelper: Packaging (Windows (64-bit)): LogWindows: Error: [Callstack] 0x00007ff7fe7878be UE4Editor-Cmd.exe!UnknownFunction [] UATHelper: Packaging (Windows (64-bit)): LogWindows: Error: [Callstack] 0x00007ff96fc254e0 KERNEL32.DLL!UnknownFunction [] UATHelper: Packaging (Windows (64-bit)): LogWindows: Error: [Callstack] 0x00007ff970ce485b ntdll.dll!UnknownFunction [] UATHelper: Packaging (Windows (64-bit)): LogWindows: Error: UATHelper: Packaging (Windows (64-bit)): LogWindows: Error: end: stack for UAT

Crash while submitting after cancel

Unhandled Exception: EXCEPTION_ACCESS_VIOLATION reading address 0xa3c00058

UE4Editor_Core!mi_usable_size()
UE4Editor_Core!_mi_heap_realloc_zero()
UE4Editor_Core!FMallocMimalloc::Realloc() [C:\actions-runner-unreal\_work\UnrealEngine\UnrealEngine\Engine\Source\Runtime\Core\Private\HAL\MallocMimalloc.cpp:134]
UE4Editor_Core!FMemory::Realloc() [C:\actions-runner-unreal\_work\UnrealEngine\UnrealEngine\Engine\Source\Runtime\Core\Public\HAL\FMemory.inl:56]
UE4Editor_Core!TArray<FString,TSizedDefaultAllocator<32> >::ResizeGrow() [C:\actions-runner-unreal\_work\UnrealEngine\UnrealEngine\Engine\Source\Runtime\Core\Public\Containers\Array.h:2539]
UE4Editor_Core!FString::ParseIntoArray() [C:\actions-runner-unreal\_work\UnrealEngine\UnrealEngine\Engine\Source\Runtime\Core\Private\Containers\String.cpp:970]
UE4Editor_GitSourceControl!GitSourceControlUtils::RunCommandInternal() [C:\actions-runner-unreal\_work\UnrealEngine\UnrealEngine\Engine\Plugins\ProjectBorealis\UE4GitPlugin\Source\GitSourceControl\Private\GitSourceControlUtils.cpp:190]
UE4Editor_GitSourceControl!GitSourceControlUtils::RunCommand() [C:\actions-runner-unreal\_work\UnrealEngine\UnrealEngine\Engine\Plugins\ProjectBorealis\UE4GitPlugin\Source\GitSourceControl\Private\GitSourceControlUtils.cpp:662]
UE4Editor_GitSourceControl!FGitCheckInWorker::Execute() [C:\actions-runner-unreal\_work\UnrealEngine\UnrealEngine\Engine\Plugins\ProjectBorealis\UE4GitPlugin\Source\GitSourceControl\Private\GitSourceControlOperations.cpp:260]
UE4Editor_GitSourceControl!FGitSourceControlCommand::DoThreadedWork() [C:\actions-runner-unreal\_work\UnrealEngine\UnrealEngine\Engine\Plugins\ProjectBorealis\UE4GitPlugin\Source\GitSourceControl\Private\GitSourceControlCommand.cpp:45]
UE4Editor_Core!FQueuedThread::Run() [C:\actions-runner-unreal\_work\UnrealEngine\UnrealEngine\Engine\Source\Runtime\Core\Private\HAL\ThreadingBase.cpp:855]
UE4Editor_Core!FRunnableThreadWin::Run() [C:\actions-runner-unreal\_work\UnrealEngine\UnrealEngine\Engine\Source\Runtime\Core\Private\Windows\WindowsRunnableThread.cpp:86]

Missing a setup step to ensure .uasset and .umap files are lockable

If you don't set up *.uasset and *.umap files as lockable then the plugin won't let you "check out" those files and won't lock them.

The Readme needs text to the effect of:

Be sure to set your *.uasset and *.umap files as both LFS and lockable using:

git lfs track "*.uasset" --lockable
git lfs track "*.umap" --lockable

in your git repo root directory.

Files being left as read-only on disk

Hey there and thanks for the plugin!

My team's been using it for a bit and there seems to be a somewhat common issue among us where files seem to be getting left as read-only even when they are checked out, and we're not sure what's causing it.

Then when Unreal tries to save the checked-out asset it fails because it's read-only, and as a result we have to spend a lot of time manually going into the filesystem in explorer and making files writable again so that we can save them.

image

Has anyone encountered an issue like this before? We're using UE 5.0 release with 3.0.4 of this plugin.

Much thanks!

Support ignoring Unreal content

We ignore our Developers folders (currently located at Content/Developers/{developername}/) because we have no need to persist the things we do in them. This means we have an entry in our .gitignore, which successfully keeps anything within from showing up in git command line. However, the files still have all the built in source control handling within Unreal, even though none of it works. For example, we can still "Check Out" these ignored files from within the Unreal UI, but then we get lines like the following in the output log:

LogSourceControl: Error: Command 'Revert' Failed!
LogSourceControl: Error: Command 'Delete' Failed!

I also attempted adding exclusions to .gitattributes making them non-lockable, not tracked by lfs, but that doesn't appear to have changed anything with regard to Unreal's attempts at managing these files as source controlled.

I'm wondering if there is some piece of configuration that I am lacking here to get these files to be fully ignored by Unreal / this plugin, or if this is a use case that it is not prepared for?

Checkout error

I'm getting this error in logs when I try to do the ckeckout in editor:

SourceControl: Error: Lock failed: Content/Blueprints/BP_InfinityCameraViewsManager.uasset: api: exec: "sh": executable file not found in %!P(MISSING)ATH%!(NOVERB)
LogSlate: Window 'Message' being destroyed
Message dialog closed, result: Ok, title: Message, text: Git command failed. Please check your connection and try again, or check the output log for more information.
LogSourceControl: Error: Command 'CheckOut' Failed!
LogSlate: Window 'Unable to Check Out From Source Control!' being destroyed
Message dialog closed, result: Ok, title: Unable to Check Out From Source Control!, text: The following assets could not be successfully checked out from source control:
/Game/Blueprints/BP_InfinityCameraViewsManager

Can you help me what could be the reason? Using command line (Git Bash and PowerShell) works without issues.

Null reference on merging local with remote

Hi, I'm evaluating your plugin for use in our studio. Looking awesome so far! The performance blows anything else we've tried out of the water!!

One thing I've noticed is a null reference when trying to merge pulled files with local changes.
Repro steps:

  • Commit a change to a file and push to remote.
  • Revert that change locally
  • It should have a ! icon
  • Modify the file locally
  • Sync the file
  • File will disappear and reappear with the merge icon
  • Merge, will null ref with the following
    image

Maybe it's something locally, just wanted to flag

Plugin causes packaging project (cooking) to fail

I'm a new user so assume this is a known issue and simple fix but I can't find an answer. File>Package project>Win64 fails immediately when this plugin exists in the project /Plugins folder. Temporarily removing the GitSourceControl.uplugin file (removing the plugin) allows the build to complete. It has to be removed this way because disabling the plugin in UE is not enough and the build still fails. Here's a piece of the output log

UATHelper: Packaging (Windows (64-bit)): Parsing command line: -ScriptsForProject= XXXXXX.uproject BuildCookRun -nocompileeditor -installed -nop4 -project=XXXXXXX.uproject -cook -stage -archive -archivedirectory=E:/XXXXXX/Str
eamingBuilds -package -ue4exe=C:\UnrealVersions\UE_4.27\Engine\Binaries\Win64\UE4Editor-Cmd.exe -compressed -ddc=InstalledDerivedDataBackendGraph -pak -prereqs -nodebuginfo -targetplatform=Win64 -build -clientconfig=Development -utf8output
UATHelper: Packaging (Windows (64-bit)): Setting up ProjectParams for E:\XRMG\source\Unreal\EagleSSCommsTester\EagleSSCommsTester.uproject
UATHelper: Packaging (Windows (64-bit)): **ERROR: System.ArgumentException: An item with the same key has already been added.**

This plugin is very complete. It even has the git-lfs.exe so I had to add an exception to the .gitignore to prevent it from being stripped but maybe its "too complete"? Something is conflicting with UE engine files. Is there a better solution than I have found?

Provide pre-built release binaries

The plugin needs to be rebuilt for unreal engine 5 every time you set it up wich was hard because i had to find out why its not building for me because a specific dotnet version was needed its dotnet 3.1 btw

"Non-unique symbol" warning in Live Coding

When opening the editor with Live Coding enabled in 4.27, the window spams the following warning:
Non-unique symbol _volmd found in COFF file C:\...\Plugins\UEGitPlugin\Intermediate\Build\Win64\UE4Editor\Development\GitSourceControl\Module.GitSourceControl.cpp.obj. Do not change the order of these variables while live coding, or consider upgrading to a newer compiler (VS 2015 or later)
image

It appears to be benign, I've not noticed any negative effects as of yet. But I thought I'd bring it to your attention regardless.

UE4 Error HEAD...origin/evelop

Hello,
i'm look to test your plugin version with Unreal 5, i have some issue with the Source Control and... i don't understand why the head look a bad name, my branch are develop and main, and i use the dev.. I'm not a C++ programmer, but if i can give more information i'm here :) .

I used your branch pb-changes-ue5.

LogSourceControl: Warning: RunCommand(locks) ReturnCode=2:
Error while retrieving locks: exit status 127
LogSourceControl: Warning: RunCommand(locks) ReturnCode=2:
Error while retrieving locks: no cached locks present
LogSourceControl: Warning: RunCommand(diff) ReturnCode=128:
fatal: bad revision 'HEAD...origin/evelop'
SourceControl: Error: fatal: bad revision 'HEAD...origin/evelop'

Embedded git-lfs getting stuck in Windows Server 2019

I'm currently working on an AWS remote machine with the specified OS and running the embedded git-lfs.exe gets stuck and never exits. This happens in UnrealEditor and even the command line builds deadlock. Running the embedded git-lfs executable ends un in being stuck, while running the installed git lfs command terminates successfully.
In my local Windows 10 machine the embedded git-lfs is behaving normally.
Note that the embedded git-lfs file deadlocks only with the lock, locks and unlock sub-commands, others like status and ls-files are working fine.
I'd suggest to add the option to use the system LFS installed with GIT instead of the embedded one.
Maybe at the end of the module life just check that all the processes have been terminated.
Here's the behavior difference between local and embedded LFS:
lfs-stuck
Great work, very much needed plugin!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.