SRombauts / UEGitPlugin

Unreal Engine 5 Git LFS 2 Source Control Plugin (beta)
http://srombauts.github.io/UEGitPlugin
MIT License
808 stars 165 forks source link

UE 4.16.1 (Plugin v2.1) Diffs problem with Submodule #44

Open rkorovin opened 7 years ago

rkorovin commented 7 years ago

Hello.

I recently migrated from Bitbucket to GitHub repo. I use LFS for uasset. Source control plugin version 2.1. My Project has submodule in Content directory.

Testcase:

  1. Select asset->SourceControl->History
  2. Click on any commit->Diff against previous revision

Message "Unable to load assets to diff. Content may no longer be supported?". Sometimes editor may freeze and don't respond (without Message).

Sorry for my english. English is not my native language(

SRombauts commented 7 years ago

Hi, I didn't test LFS on 4.16 nor on the standalone plugin. I am unable to test this now, but can you:

  1. either
    1. Post a complete Log of a short session showing the startup and then the failing operation
    2. Or at least tell me the results of 'git version' and 'git lfs version' you should use very recent git if possible, at least 2.10.windows
  2. Then, remove the "Git (dev) " plugin 2.1 and test again with the "Git (beta version)" plugin 1.0 that I also maintain in Unreal Engine
SRombauts commented 7 years ago

Also, I didn't realized you said Content was on a submodule... I am totally unsure about this, it is not tested /officially supported (I should think about this, but lacks the time to)

rkorovin commented 7 years ago

'git version' - version 2.11.0.windows.1 'git lfs version' - git-lfs/2.0.2 (GitHub; windows 386; go 1.8; git 85e2aec4)

Test case with message "Unable to load assets to diff. Content may no longer be supported?". At the end I open plugin settings in editor. log.txt

Test case with freeze. log2.txt

rkorovin commented 7 years ago

Then, remove the "Git (dev) " plugin 2.1 and test again with the "Git (beta version)" plugin 1.0 that I also maintain in Unreal Engine

After that, the editor stopped freezing. But instead of diffs I always see a message "Unable to load assets to diff. Content may no longer be supported?".

rkorovin commented 7 years ago

Maybe this will help... Use SourceTree with built-in git & lfs. System variables in win 10 are configured correctly. Since I checked git/lfs versions in SourceTree's bash.

SRombauts commented 7 years ago

Hi @rkorovin, thanks a lot for providing these logs and requested information. I cannot see anything suspect in it, so I'll have to dive into this.

As stated before, I currently don't have much spare time (if any) but I'll try to do at least a few tests this evening. I could/should also add some logs around the method in charge to "Dump content of a specific revision of a file": It uses a special process to do that, and because of that I am blind about it your case.

The crash in the standalone plugin scares me, as I did some "cleanup" of this exact function, but I cannot see anything special on the new code...

ps: please come back here and ask if you dont' hear from me in the near future!

SRombauts commented 7 years ago

Also, I strongly suspect that the first culprit is that the plugin is picking the SourceTree Git.exe but somehow calling it out of bash break something.

If you don't want to wait for a 2.1.1 of the plugin with more logs or an hypothetical fix, you could also install the standalone Git for windows+lfs as I am pretty this could solve your problem.

Cheers!

rkorovin commented 7 years ago

If you don't want to wait for a 2.1.1 of the plugin with more logs or an hypothetical fix, you could also install the standalone Git for windows+lfs as I am pretty this could solve your problem.

I was just thinking about trying to do this. Also the problem can be covered in migration from Bitbucket to Github. Perhaps information about the old remote is stored somewhere. For the purity of the experiment, you can use in tests my project "GameMechanics" on github.

rkorovin commented 7 years ago

If you don't want to wait for a 2.1.1 of the plugin with more logs or an hypothetical fix, you could also install the standalone Git for windows+lfs as I am pretty this could solve your problem.

I do it. It works beter. Now i can see some diffs for 10-15% of files (In other cases I see the same message). I think this is because they are somehow connected with a submodule. For example, actors use ActorComponents implemented in a submodule. And this is not enough for normal work. Because major part of the logic is in the submodule or is connected with it(

SRombauts commented 7 years ago

Yes, git submodules are not supported by the plugin (Git LFS or not, I don't think it matters). I could try to improve on this.

I've downloaded your Github project, but it's big and took forever, now it is downloading a plugin from the marketplace. I'll give it a try latter.

rkorovin commented 7 years ago

I, meanwhile, will try to check what will happen if the components of the submodule are implemented on C++. I do not think it will change the situation with related uassets. But at least Diffs can be watched in SourceTree.

rkorovin commented 7 years ago

So i test Plugin with c++ Game Module as Git Submodule and it works! I think the problem lies in the fact that submodule content is in the Large File Storage.

adnoh commented 5 years ago

@SRombauts I have the problem still in current engine builds with LFS and without (the "beta" module included in UE). As soon as my Content like BPs is in a submodule I can't diff it in the Editor anymore which the Message Unable to load assets to diff. Content may no longer be supported? This is really anoying - I work a lot with bundling Content in Git Submodules (UE Plugins / DLCs)

Bazard commented 3 years ago

Hi there, do you have any plan on adding submodules support in your plugin ?

I am in a similar situation as @adnoh, I often work with submodules for plugins and DLCs in my projects, it would be really great to be able to use your plugin with them (at least the diff feature). Currently, on submodules files we can only see when the pointer in main repo has changed in history, but we can't see the history inside the submodule itself, or doing diff on submodule files.

Louspirit commented 3 years ago

This feature is critical. As there is no way to make Blueprint libraries, the best way I found to share blueprints between projects is with git submodules. But I can't work efficiently without the git plugin operations. It does not even detect fix redirections, so inexisting files come up in SourceTree (renamed/deleted files).

And there ain't any solutions external to UE for blueprint diff am I right?

Louspirit commented 3 years ago

@SRombauts did you take a look at this? Can we help somehow?

When trying to run a diff on a submodule file, I get the following error :

LogSourceControl: Error: DumpToFile: ReturnCode=255

EvoPulseGaming commented 3 years ago

Same issue here, cannot diff in ue4 on content in submodules as it does not see the history of the submodule repos. The plugin should be looking in .git/modules/ folder for additional repos to load history on.

in my case: .git/modules/plugins/x .git/modules/plugins/y .git/modules/plugins/z etc

Each one of those folders is basically its own .git folder with config, HEAD, index ect.

Basically recursively search the directory, and back out once you find the config file. Then go to the next folder.