Jump to content

UnityYAMLMerge.exe - Error in merge tool


Guest Jack
 Share

Recommended Posts

Sometimes we have an error during merge (see attached image)

Here are definition of that merge tool from client.conf

    <MergeToolData>
      <FileExtensions>.prefab;.unity</FileExtensions>
      <Tools>
        <string>"C:\Program Files\Unity\Editor\data\Tools\UnityYAMLMerge.exe" merge -p "@basefile" "@sourcefile" "@destinationfile" "@output"</string>
        <string>mergetool -b="@basefile" -bn="@basesymbolic" -bh="@basehash" -s="@sourcefile" -sn="@sourcesymbolic" -sh="@sourcehash" -d="@destinationfile" -dh="@destinationhash" -a -r="@output" -t="@filetype" -i="@comparationmethod" -e="@fileencoding" -m="@mergetype" -re="@resultencoding" --progress="@progress" --extrainfofile="@extrainfofile"</string>
      </Tools>
    </MergeToolData>

 

I managed to bypass the error by deleting definition for UnityYAMLMerge

 

2018_00_25_22.jpg

Link to comment
Share on other sites

  • 5 months later...
On 8/28/2018 at 9:44 AM, calbzam said:

Could you check if the tool is available on this path? 

It's not. unity changed that path with the new Unity Hub. It went from

C:\Program Files\Unity\Hub\Editor\Data\Tools

To

C:\Program Files\Unity\Hub\Editor\2018.3.0f2\Editor\Data\Tools

I found the client.conf file in C:\Users\UserName\AppData\Local\plastic4 and edited it with the proper path but still get the same error. 😕

Link to comment
Share on other sites

Hi Marc,

From the Plastic GUI --> Preferences, you can configure the external merge tools (eg: UnityYAMLMerge). Plastic just try open the external merge tool based on the configured parameters. You need to be sure the external tool path and required parameters are correct. 

I've found this Unity guide where they explain how to configure UnityYAMLMerge with third party tools (like Plastic SCM):

https://docs.unity3d.com/Manual/SmartMerge.html

Regards,

Carlos.

Link to comment
Share on other sites

Guest Guest Marc S

Thanks Calbzam.

I tried but it didn't work.

I'd like to try again but i get the error message telling me a merge is in progress but I had to close that window to access preferences.  How do i open it again?

 

I managed by reverting my changes (this a just a test). though I still get the same error message. I tried unity's instructions with possible variations (<path to UnityYAMLMerge> merge -p "@basefile" "@sourcefile" "@destinationfile" "@output")

"C:\Program Files\Unity\Hub\Editor\2018.3.0f2\Editor\Data\Tools\UnityYAMLMerge.exe" merge -p "@basefile" "@sourcefile"  "@destinationfile" "@output"

<C:\Program Files\Unity\Hub\Editor\2018.3.0f2\Editor\Data\Tools\UnityYAMLMerge.exe> merge -p "@basefile" "@sourcefile"  "@destinationfile" "@output"

<"C:\Program Files\Unity\Hub\Editor\2018.3.0f2\Editor\Data\Tools\UnityYAMLMerge.exe"> merge -p "@basefile" "@sourcefile"  "@destinationfile" "@output"

2091028133_2019-02-0614_15_45-PlasticSCM-Pendingchanges(3Items-2checked).png.e8975669525eefd84c5be1b0fa3a7147.png

I checked if the path is wrong but it seems right.

241864258_2019-02-0614_35_02-Tools.png.1f110d1c0241da320482d338f2279350.png

Am I missing something?

Thanks

Link to comment
Share on other sites

Hi!

Can you share how do you have it configured in the "client.conf" file (by default at "C:\Users\<your_user>\AppData\Local\plastic4")?

My configuration that works fine is:

<MergeToolData>
      <FileExtensions>.scene</FileExtensions>
      <Tools>
        <string>"C:\Program Files\Unity\Editor\Data\Tools\UnityYAMLMerge.exe" merge -p "@basefile" "@sourcefile" "@destinationfile" "@output"</string>
      </Tools>
    </MergeToolData>
    <MergeToolData>
      <FileExtensions>.prefab</FileExtensions>
      <Tools>
        <string>"C:\Program Files\Unity\Editor\Data\Tools\UnityYAMLMerge.exe" merge -p "@basefile" "@sourcefile" "@destinationfile" "@output"</string>
      </Tools>
    </MergeToolData>

Best,
Manu.

Link to comment
Share on other sites

Guest Nicolas M

Hi thanks for your reply

 

My configuration look like this

<MergeToolData>
      <FileExtensions>.prefab</FileExtensions>
      <Tools>
        <string>"C:\Program Files\Unity 2018.3\2018.3.0f2\Editor\Data\Tools\UnityYAMLMerge.exe" merge -p "@basefile" "@sourcefile"  "@destinationfile" "@output"</string>
      </Tools>
    </MergeToolData>
<MergeToolData>
      <FileExtensions>.unity</FileExtensions>
      <Tools>
        <string>"C:\Program Files\Unity 2018.3\2018.3.0f2\Editor\Data\Tools\UnityYAMLMerge.exe" merge -p "@basefile" "@sourcefile"  "@destinationfile" "@output"</string>
      </Tools>
    </MergeToolData>

 

Link to comment
Share on other sites

So, i went back home and tried a merge with my other computer and it worked fine.

We also installed a the latest Unity version and linked to a fresh install of UnityYAMLMerge.exe in case the existing one was corrupt but we get the same error. I think Nicolas issue might come from his computer.

If anybody as a suggestion, they are welcome.

Thanks

Link to comment
Share on other sites

  • 2 years later...

Hey guys, just wanted to point out that UnityYAMLMerge.exe is not located at the location that PlasticSCM thinks it is by default. Unity's own documentation page is incorrect (https://docs.unity3d.com/2020.2/Documentation/Manual/SmartMerge.html).

Its located at "C:\Program Files\Unity\Hub\Editor\UNITY VERSION NUMBER\Editor\Data\Tools\UnityYAMLMerge.exe", which unfortunately makes it harder/impossible to just use a default location for it 😪

It also looks like you can't simply move the UnityYAMLMerge.exe file to another permanent location, it relies on other files with a relative/local path (maybe its just one or two files, not sure). So seems a bit frustrating that if you update your Unity version and then delete the old one, you'd then have to update the YAML path again. Not a big deal, but having to explain/remind your team members how to do it isn't ideal, haha.

Would anyone happen to know what all files the UnityYAMLMerge.exe relies upon, such that I could create a permanent folder for it?

Link to comment
Share on other sites

  • 2 weeks later...

Can anyone confirm whether YAMLMerge will work when defining it for .prefab;.unity both in one statement?

I’m also trying to make this process easier for my team but so far its tedious. Especially since you can only define a single tool for the entire client, whereas I would prefer to set the merge tool per repository or at least workspace to match the Unity version. 
 

Unless Unity would state if there are actually any changes between the YAMlMerge tool versions...

Link to comment
Share on other sites

On 3/9/2021 at 5:14 AM, Xarbrough said:

Can anyone confirm whether YAMLMerge will work when defining it for .prefab;.unity both in one statement?

I’m also trying to make this process easier for my team but so far its tedious. Especially since you can only define a single tool for the entire client, whereas I would prefer to set the merge tool per repository or at least workspace to match the Unity version. 
 

Unless Unity would state if there are actually any changes between the YAMlMerge tool versions...

I don't know the exact answer to these questions but I can add my experience - since we used the "Unity Collaborate -> Plastic SCM" migration tool, our Client.Conf for our Windows PCs was automatically configured (for the most part). In the Preferences -> Merge Tools window it shows ".unity;.prefab" as a single entry using "MULTIPLE_TOOLS". Here is a copy of just the <MergeTools> section of my client.conf, it has one entry for both ".prefab;.unity":

<MergeTools>
    <MergeToolData>
      <FileExtensions>.doc;.docx</FileExtensions>
      <Tools>
        <string>"C:\Program Files\PlasticSCM5\client\diffscripts\merge-doc.exe" "@destinationfile" "@sourcefile"  "@output"</string>
      </Tools>
    </MergeToolData>
    <MergeToolData>
      <FileExtensions>.prefab;.unity</FileExtensions>
      <Tools>
        <string>"C:\Program Files\Unity\Hub\Editor\2020.2.0f1\Editor\Data\Tools\UnityYAMLMerge.exe" merge -p "@basefile" "@sourcefile" "@destinationfile" "@output"</string>
        <string>mergetool -b="@basefile" -bn="@basesymbolic" -bh="@basehash" -s="@sourcefile" -sn="@sourcesymbolic" -sh="@sourcehash" -d="@destinationfile" -dh="@destinationhash" -a -r="@output" -t="@filetype" -i="@comparationmethod" -e="@fileencoding" -m="@mergetype" -re="@resultencoding" --progress="@progress" --extrainfofile="@extrainfofile"</string>
      </Tools>
    </MergeToolData>
    <MergeToolData>
      <FileExtensions>.meta</FileExtensions>
      <Tools>
        <string>mergetool -b="@basefile" -bn="@basesymbolic" -bh="@basehash" -s="@sourcefile" -sn="@sourcesymbolic" -sh="@sourcehash" -d="@destinationfile" -dh="@destinationhash" -a -r="@output" -t="@filetype" -i="@comparationmethod" -e="@fileencoding" -m="@mergetype" -re="@resultencoding" --progress="@progress" --extrainfofile="@extrainfofile"</string>
      </Tools>
    </MergeToolData>
    <MergeToolData>
      <FileType>enTextFile</FileType>
      <FileExtensions>*</FileExtensions>
      <Tools>
        <string>mergetool -b="@basefile" -bn="@basesymbolic" -bh="@basehash" -s="@sourcefile" -sn="@sourcesymbolic" -sh="@sourcehash" -d="@destinationfile" -dh="@destinationhash" -a -r="@output" -t="@filetype" -i="@comparationmethod" -e="@fileencoding" -m="@mergetype" -re="@resultencoding" --progress="@progress" --extrainfofile="@extrainfofile"</string>
      </Tools>
    </MergeToolData>
    <MergeToolData>
      <FileType>enBinaryFile</FileType>
      <FileExtensions>*</FileExtensions>
      <Tools>
        <string>binmergetool -b="@basefile" -bn="@basesymbolic" -bh="@basehash" -s="@sourcefile" -sn="@sourcesymbolic" -sh="@sourcehash" -d="@destinationfile" -dh="@destinationhash" -a -r="@output" -m="@mergetype"</string>
      </Tools>
    </MergeToolData>
  </MergeTools>

(As discussed previously in this thread) The MergeTool entry for ".unity;.prefab" is pointing to the old/incorrect place that Unity used to store the UnityYAMLMerge.exe. So you have to point it at the new file location within your specific unity-version folder. My guess would be that the YAMLMerge tool probably doesn't change much from version-to-version, but maybe *if* they were to add some new functionality to Unity they would then need to update the merge tool so it properly handles that new functionality? And that might be why its now "version-dependant"? Just a guess, still doesn't make it any easier for us, but I see why they would do it that way.

One of our team members is using a Mac, and although we used the same migration tool for him to sign up and download the repository, he did not have any special MergeTool settings. I believe his was what I'm guessing is the default setup for Plastic (he only had an entry for $text), so we had to configure things for him. There are differences in what tools are available from Plastic for people using a Mac - I'm about to make a new post about it here on the forums (Edit: here is the link - 

 

  • Like 1
Link to comment
Share on other sites

  • 9 months later...

unknown.png

Hello, trying to resolve conflicts and this error popped up. I'm currently using Unity 2020.3.25f1, so I went to C:\Users\myUser\AppData\Local\plastic4\client.conf and changed the path to:

<MergeToolData>
      <FileExtensions>.prefab;.unity</FileExtensions>
      <Tools>
        <string>"C:\Program Files\Unity\Hub\Editor\2020.3.25f1\Editor\Data\Tools\UnityYAMLMerge.exe" merge -p "@basefile" "@sourcefile" "@destinationfile" "@output"</string>
        <string>mergetool -b="@basefile" -bn="@basesymbolic" -bh="@basehash" -s="@sourcefile" -sn="@sourcesymbolic" -sh="@sourcehash" -d="@destinationfile" -dh="@destinationhash" -a -r="@output" -t="@filetype" -i="@comparationmethod" -e="@fileencoding" -m="@mergetype" -re="@resultencoding" --progress="@progress" --extrainfofile="@extrainfofile"</string>
      </Tools>
    </MergeToolData>

as @Gardenfiend Games suggested above and I'm still getting the same error. Is this path with my old Unity Version mentioned somewhere else where I should change it?

Thank you!

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...