UnityYAMLMerge: a few annoying thing

Hi,

I’m using p4merge as a merge tool.
And I found the arguments are ordered wrong in mergespecfile according https://www.perforce.com/perforce/r12.1/manuals/cmdref/env.P4MERGE.html.
I correct ‘%l %r’ to ‘%r %l’ whenever mergespecfile is overwritten by Unity Update.

And one more thing.
UnityYAMLMerge generates unrecognizable file names for the fallback.

2386017--162436--merge02.png

Even though the pretty file names are passed as the arguments from SourceTree.

2386017--162435--merge01.png

Thanks for the feedback. Will fix the mergespecfile issue and also see what to do about the pretty name issue.

I actually tried to use UnityYAMLMerge in the past, but i was never able to tell whether it was working or not…

I used to select “Resolve conflicts using external merge tool”, but it didn’t seem to do anything - no window or anything opened and i had no idea whether it actually did something or not…

“Resolve conflicts using external merge tool” is not unityyamlmerge but is whatever merge tool you have configured in your preferences. If that tool can do a clean merge itself without the need for manual fixups you will not see the external merge tool but just get the resulting merge right away.

So by this you mean that UnityYAMLMerge will run automatically when merges are being performed (e.g: after doing a git pull) ?

Ah… I though you were using the integrated perforce ui in Unity. I guess you are using git and have enabled UnityYAMLMerge as mergetool on sourcetree or tortoiseGIt? In that case UnityYAMLMerge will do a merge and never show a GUI if it can do it without conflicts. In case of conflicts it will fallback to a 3rd party merge tool for the remaining conflicts. The fallbacks are specified in the mergespecfile.txt which is right next to the tool executable itself.

Thanks for clarifying. Is that process (e.g: mergespecfile.txt) documented anywhere?
I’ve tried using UnityYamlMerge a few times but it didn’t appear to have done anything so i assumed it simply didn’t work… now i know that it must’ve probably merged the scenes/prefabs by itself.

Run UnityYAMLMerge.exe and it will show usage including the --fallback option for using a custom mergespecfile.txt. Also have a look at this page explaining about the mergespecfile.txt http://docs.unity3d.com/Manual/SmartMerge.html

I am on OSX, trying to setup UnityYAMLMerge now. The docs seem to be a bit confusing:

2514165--174085--upload_2016-2-17_11-19-58.png

This is what i have configured:

2514165--174087--upload_2016-2-17_11-26-49.png

Does this look OK? should i leave out the “diff” command empty ? (i think it should be better stressed out in the docs).

After merging 2 branches, i still get conflicts in sourcetree, but the tool i have set up in the mergespecs file is not launched immediately:

2514165--174088--upload_2016-2-17_11-27-42.png

Does this look like a proper configuration? what am i doing wrong ?

Sourcetree will not automatically popup the mergetool unfortunately. After you get a conflict you need to right click the file that have conflicts and select “Resolve conflicts → Launch External Merge Tool”.

I have nothing configured in the merge tool (see the image above). I left it empty (per the documentation).

Selecting “Resolve using an external merge tool” does nothing in that case…

I see… afaik it was a UI bug in sourcetree where the label was “diff command”. It seems that have fixed it to “merge command” now. So just put it in the “merge command” field instead and you should be fine.

1 Like

Can we please have at least a MessageBox that the merge was completed succesiful? If I understand correctly you didn’ty add this to not disrupt the automerge behaviour, but when doing resolve manually, it’s hard to tell if everything worked as should and you need to accept the merge whatever that was.
A messagebox or a log somewhere will be nice.

*Using TortoiseGit + YAMLMerge