Merging very large files

Hi

We’re working two programmers in a project with typescript. So we’re compiling all our local code into a single file which gets very large at ~15k lines before minifiying.

We’re working in branches, and when we have to merge back into master we will get a conflict in this 15k line file. When you try to resolve the conflict and view the differences, Playcanvas will freeze and crash and cannot display the file.

Any way around this? Can we add this file to a gitignore kind of file so it’s never merged by PlayCanvas?

Our current solution is to ensure that the file is identical on both branches before merging but this gets very tedious fast.

Hi @Christian_Thomsen,

I think you’ll be pleased to know that we are almost done implementing this exact feature! Should be done in a few days.

1 Like

It’s done already, please add a file called pcignore.txt to your branch, create a checkpoint, so that the latest checkpoint of your destination branch before a merge has that file, and merge. The syntax is the same as gitignore

3 Likes

Awesome! I’ll try it out.

I tried adding a pcignore.txt file in both destination and source branch, but my coworker still got a conflict. It seemed to work for me however. Should the file be in the root of the project? In the file I have written:

Scripts/main.build.js

which is the destination of the file. That should be good right?

On a related note we also just experienced PlayCanvas crashing when trying to merge with a large amount of scene changes. About ~800.

pcignore.txt should be in the root of the project if not already.

Other than that, that looks fine.

Could you DM either me or @vaios the project id please? Perhaps we can look into the logs for these crashes.

Also pcignore.txt should be present in the last checkpoint before a merge

1 Like

I’ll do that, thanks.

@Christian_Thomsen, our latest deploy may have fixed your issue with merging a large number of scene changes. Please try it again. If you still see a problem, please describe in more detail what happens, e.g. are there error messages, at which stage of a merge, does it simply time out etc.

We have not encountered any new issues with scene merging zpaul so that’s all good for now. We’re also trying to keep scene changes low.

I cannot get the pcignore file to work. Should the change be deployed already?
I have a test project here with two branches and I get a conflict when merging testBranch into master.
But I have added ConflictTest.js to my pcignore file, so I shouldn’t be getting this conflict right?

Anything i’m missing?

https://playcanvas.com/editor/scene/915753

1 Like

Add .txt to the file and also ensure that the branch has a checkpoint with the file already in it :slight_smile: That should do it.

Adding .txt did the trick! Awesome yaustar, thanks :smiley:

1 Like