How to save my binary assets using Mercurial?

I am starting a game development project and my team, and I will use Mercurial for version control, and I was wondering what a more suitable way to store binary assets for the game would be. Basically, I have 2 options:

  • Mercurial 2.1 has a large file extension , but I don’t know too much about it. It looks like it will solve the "repository overgrowth" problem, but it does not solve the problem with the binary merge conflict.

  • Saving binary assets in SVN validation as a subreport. Thus, we can lock files for editing and avoid merge conflicts, but I would really like to avoid using two version control systems (especially those that I don’t really like).

Any insights / tips or other options that I haven't thought about?

+4
source share
2 answers

You guessed it, large files will do what you need. To merge binary files, you can configure a merge tool if one exists for your file type . Something like that:

[merge-tools] mymergetool.priority = 100 mymergetool.premerge = False mymergetool.args = $local $other $base -o $output myimgmerge = SOME-PROGRAM-THAT-WILL-MERGE-IMAGES-FOR-YOU [merge-patterns] **.jpg = myimgmerge **.exe = internal:fail 

In general, merging non-text things will always be a pain using the source control tool. Digital Asset Management applications exist to make this less painful, but they are not decentralized or very enjoyable to work with.

+2
source

You are right that the extension of large files will avoid bloating the repository. It happens that you upload only the large files necessary for the check you are checking. So, if you have a 50 MB file, and it has been radically edited 10 times, then versions can take up to 500 MB on the server. However, when you do hg update , you only download the 50 megabyte version necessary for this version.

You are also right that the large file extension does not help merges. Infact, it completely skips the merge step and requests only the following:

 largefile <some large file> has a merge conflict keep (l)ocal or take (o)ther? 

You are not able to use conventional merger equipment.

To make a lock, you can use the lock extension that I wrote for the client. They wanted this for their documentation department, where people would work with files that could not be easily combined. It basically turns Mercurial into a centralized system similar to Subversion: locks are stored in a file in the central repository, and the client contacts this repository when hg locks starts and before hg commit .

+2
source

Source: https://habr.com/ru/post/1395698/


All Articles