Jump to content

Smart Merge Tool not being recognized?


yourchingoo

Recommended Posts

Hello,

I'm very new to Plastic and have been running into a problem with the merge tool. How our team operates with Plastic at the moment is that we have each person working on a separate branch of our Unity project and whenever a sprint is finished we merge all of our changes together on /main. 

We followed all the steps for implementing the merge tools here:

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

But when I try to merge the .unity files, there's actually an error with mergetool definition. I changed "mergetool" to the macmergetool file path (I am using a mac) to resolve the error, but that's besides the point. Why would "mergetool" be called instead of the UnityYAMLMerge executable? 
 

image.thumb.png.edd93086d7bad24ccbd7a671dfeffc03.png

 

Here is my Merge Tools settings:

image.thumb.png.f09de465c83af7ba3d615e3491ef9865.png

And here is my client.conf:

<MergeTools>
  <MergeToolData>
    <FileType>enTextFile</FileType>
    <FileExtensions>*</FileExtensions>
    <Tools>
      <string>mergetool -b="@basefile" -bn="@basesymbolic" -bh="@basehash" -s="@sourcefile" -sn="@sourcesymbolic" -d="@destinationfile" -dn="@destinationsymbolic" -t="@filetype" -i="@comparationmethod" -e="@fileencoding" -sh="@sourcehash" -dh="@destinationhash" -r="@output" -a -m="@mergetype" -re="@resultencoding"</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>
  <MergeToolData>
    <FileType>enTextFile</FileType>
    <FileExtensions>.prefab</FileExtensions>
    <Tools>
      <string>"/Applications/Unity/Hub/Editor/2020.3.30f1/Unity.app/Contents/Tools/UnityYAMLMerge" merge -p "@basefile" "@sourcefile" "@destinationfile" "@output"</string>
    </Tools>
  </MergeToolData>
  <MergeToolData>
    <FileType>enTextFile</FileType>
    <FileExtensions>.unity</FileExtensions>
    <Tools>
      <string>"/Applications/Unity/Hub/Editor/2020.3.30f1/Unity.app/Contents/Tools/UnityYAMLMerge" merge -p "@basefile" "@sourcefile" "@destinationfile" "@output"</string>
    </Tools>
  </MergeToolData>
  <MergeToolData>
    <FileType>enTextFile</FileType>
    <FileExtensions>.meta</FileExtensions>
    <Tools>
      <string>"/usr/local/bin/macmergetool" -b="@basefile" -bn="@basesymbolic" -bh="@basehash" -s="@sourcefile" -sn="@sourcesymbolic" -d="@destinationfile" -dn="@destinationsymbolic" -t="@filetype" -i="@comparationmethod" -e="@fileencoding" -sh="@sourcehash" -dh="@destinationhash" -r="@output" -a -m="@mergetype" -re="@resultencoding"</string>
    </Tools>
  </MergeToolData>
</MergeTools>
<DiffTools>
	<DiffToolData>
      <FileType>enTextFile</FileType>
      <FileExtensions>*</FileExtensions>
      <Tools>
        <string>$internal_tool</string>
      </Tools>
    </DiffToolData>
    <DiffToolData>
      <FileType>enBinaryFile</FileType>
      <FileExtensions>*</FileExtensions>
      <Tools>
        <string>binmergetool -s="@sourcefile" -sn="@sourcesymbolic" -d="@destinationfile" -dn="@destinationsymbolic"  -a -t="@filetype" -i="@comparationmethod" -e="@fileencoding"</string>
      </Tools>
	</DiffToolData>
</DiffTools>

 

Some clarity on this issue would be appreciated. Thank you!

Link to comment
Share on other sites

Hi,

Apologies for the delay in response. It seems that if you do not have the Plastic SCM client installed on Mac, the Unity plugin defaults the diff and merge tools to use the Windows OS compatible ones. This is a bug that we have identified and will be fixing in a later version of the plugin. 

To manually resolve this yourself, in the Plastic SCM Preferences, please can you change the merge tool command line for the $text type to... 

"/usr/local/bin/macmergetool" -b="@basefile" -bn="@basesymbolic" -bh="@basehash" -s="@sourcefile" -sn="@sourcesymbolic" -d="@destinationfile" -dn="@destinationsymbolic" -t="@filetype" -i="@comparationmethod" -e="@fileencoding" -sh="@sourcehash" -dh="@destinationhash" -r="@output" -a -m="@mergetype" -re="@resultencoding"

Also, please completely remove the entry for the $binary type, as Mac does not have a compatible alternative.

(Please note: you may need to make a similar change in the Diff Tools options as well)

Quote

Why would "mergetool" be called instead of the UnityYAMLMerge executable? 

UnitySmartMerge tries its best to merge scene (YAML text based) files but if it detects a conflict it cannot merge, it will fallback to the standard merge tool.

Hope this helps!

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
×
×
  • Create New...