Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Question Error in Merge Tool

Discussion in 'Unity Version Control' started by MoonMoritz, Aug 29, 2022.

  1. MoonMoritz

    MoonMoritz

    Joined:
    Jan 30, 2022
    Posts:
    18
    I currently am stuck with a changeset where I'm trying to merge a parent branch into a child branch.
    I normally merge without issues on a regular basis, what could be the cause for this? Seems to be Unity Related, but Plastic is the tool that barfs with an unhandled error here.

    upload_2022-8-29_9-11-38.png

    I have seen this issue a couple of times in the past, but can't recall how it was resolved. (probably because the merge was trivial enough)
     

    Attached Files:

  2. carlosalba1985

    carlosalba1985

    Unity Technologies

    Joined:
    Jul 19, 2021
    Posts:
    841
    Are you working on Windows or macOS? Does this "UnityYAMLMerge.exe" path exist in your machine?

    Can you attach your "C:\Users\xxx\AppData\Local\plastic4\client.conf"? Something seems to be wrong with it.

    Regards,
    Carlos.
     
  3. MoonMoritz

    MoonMoritz

    Joined:
    Jan 30, 2022
    Posts:
    18
    I suspect uninstalling and installing a few new Unity editors caused it, or it may have existed all along.

    I still get the issue very sporadically on .prefab file merges.

    Code (JavaScript):
    1. <?xml version="1.0" encoding="utf-8"?>
    2. <ClientConfigData xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    3.   <Language>en</Language>
    4.   <WorkspaceServer>local</WorkspaceServer>
    5.   <WorkingMode>SSOWorkingMode</WorkingMode>
    6.   <SecurityConfig>-------CENSORED----------</SecurityConfig>
    7.   <CurrentWorkspace>c:\Projects\-------CENSORED----------</CurrentWorkspace>
    8.   <MergeTools>
    9.     <MergeToolData>
    10.       <FileExtensions>.doc;.docx</FileExtensions>
    11.       <Tools>
    12.         <string>"C:\Program Files\PlasticSCM5\client\diffscripts\merge-doc.exe" "@destinationfile" "@sourcefile"  "@output"</string>
    13.       </Tools>
    14.     </MergeToolData>
    15.     <MergeToolData>
    16.       <FileExtensions>.prefab;.unity</FileExtensions>
    17.       <Tools>
    18.         <string>"C:\Program Files\Unity\Editor\data\Tools\UnityYAMLMerge.exe" merge -p "@basefile" "@sourcefile" "@destinationfile" "@output"</string>
    19.         <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>
    20.       </Tools>
    21.     </MergeToolData>
    22.     <MergeToolData>
    23.       <FileType>enTextFile</FileType>
    24.       <FileExtensions>.meta</FileExtensions>
    25.       <Tools>
    26.         <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>
    27.       </Tools>
    28.     </MergeToolData>
    29.     <MergeToolData>
    30.       <FileType>enTextFile</FileType>
    31.       <FileExtensions>*</FileExtensions>
    32.       <Tools>
    33.         <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>
    34.       </Tools>
    35.     </MergeToolData>
    36.     <MergeToolData>
    37.       <FileType>enBinaryFile</FileType>
    38.       <FileExtensions>*</FileExtensions>
    39.       <Tools>
    40.         <string>binmergetool -b="@basefile" -bn="@basesymbolic" -bh="@basehash" -s="@sourcefile" -sn="@sourcesymbolic" -sh="@sourcehash" -d="@destinationfile" -dh="@destinationhash" -a -r="@output" -m="@mergetype"</string>
    41.       </Tools>
    42.     </MergeToolData>
    43.   </MergeTools>
    44.   <DiffTools>
    45.     <DiffToolData>
    46.       <FileExtensions>.doc;.docx</FileExtensions>
    47.       <Tools>
    48.         <string>wscript.exe "C:\Program Files\PlasticSCM5\client\diffscripts\diff-doc.js" "@sourcefile" "@destinationfile" //E:javascript</string>
    49.       </Tools>
    50.     </DiffToolData>
    51.     <DiffToolData>
    52.       <FileExtensions>.xls;.xlsx</FileExtensions>
    53.       <Tools>
    54.         <string>wscript.exe "C:\Program Files\PlasticSCM5\client\diffscripts\diff-xls.js" "@sourcefile" "@destinationfile" //E:javascript</string>
    55.       </Tools>
    56.     </DiffToolData>
    57.     <DiffToolData>
    58.       <FileExtensions>.ppt;.pptx</FileExtensions>
    59.       <Tools>
    60.         <string>wscript.exe "C:\Program Files\PlasticSCM5\client\diffscripts\diff-ppt.js" "@sourcefile" "@destinationfile" //E:javascript</string>
    61.       </Tools>
    62.     </DiffToolData>
    63.     <DiffToolData>
    64.       <FileExtensions>.odt;.ods</FileExtensions>
    65.       <Tools>
    66.         <string>wscript.exe "C:\Program Files\PlasticSCM5\client\diffscripts\diff-odt.vbs" "@sourcefile" "@destinationfile" //E:vbscript</string>
    67.       </Tools>
    68.     </DiffToolData>
    69.     <DiffToolData>
    70.       <FileType>enTextFile</FileType>
    71.       <FileExtensions>*</FileExtensions>
    72.       <Tools>
    73.         <string>$internal_tool</string>
    74.       </Tools>
    75.     </DiffToolData>
    76.     <DiffToolData>
    77.       <FileType>enBinaryFile</FileType>
    78.       <FileExtensions>*</FileExtensions>
    79.       <Tools>
    80.         <string>binmergetool -s="@sourcefile" -sn="@sourcesymbolic" -d="@destinationfile" -dn="@destinationsymbolic"  -a -t="@filetype" -i="@comparationmethod" -e="@fileencoding"</string>
    81.       </Tools>
    82.     </DiffToolData>
    83.   </DiffTools>
    84.   <ShowPerformanceWarnings>yes</ShowPerformanceWarnings>
    85.   <MergeWithPendingChanges>no</MergeWithPendingChanges>
    86.   <StackTrace>no</StackTrace>
    87.   <SetFilesAsReadOnly>no</SetFilesAsReadOnly>
    88.   <SetRevisionFileDate>yes</SetRevisionFileDate>
    89.   <SupportSmbWorkspaces>no</SupportSmbWorkspaces>
    90.   <PerformAddPlusCi>no</PerformAddPlusCi>
    91.   <CheckFileContentForChanged>yes</CheckFileContentForChanged>
    92.   <CaseSensitiveFsOnMac>no</CaseSensitiveFsOnMac>
    93.   <SameItemDifferentCaseError>yes</SameItemDifferentCaseError>
    94.   <CheckinQueuesSize>50</CheckinQueuesSize>
    95.   <DownloadPoolSize>6</DownloadPoolSize>
    96.   <PendingChangesOnSwitchAction>Warn</PendingChangesOnSwitchAction>
    97.   <LastRunningEdition>cloud</LastRunningEdition>
    98. </ClientConfigData>
     
    Last edited: Aug 31, 2022
  4. MoonMoritz

    MoonMoritz

    Joined:
    Jan 30, 2022
    Posts:
    18
    More info:
    The path C:\Program Files\Unity\Editor\data\Tools\ does not exist on my machine.

    In fact, C:\Program Files\Unity does not either:
    upload_2022-8-31_12-47-45.png


    I set my Hub to install Unity Editors to C:\Unity; but the subdirectory structure there is automatically split by editor version:
    upload_2022-8-31_12-48-55.png

    UnityYAMLMerge.exe is inside these subdirectories for each editor version.
    upload_2022-8-31_12-52-26.png
    It's probably important that Plastic always picks the right one for each project (as it may be a different Unity Version), but I guess they are likely mostly compatible at this stage. However, the editor versions will get installed and uninstalled a lot, so the executable is a moving target and will change at least once every month, probably more often than that.

    Would Plastic respect a Symlink / NTFS Link there?
     
  5. carlosalba1985

    carlosalba1985

    Unity Technologies

    Joined:
    Jul 19, 2021
    Posts:
    841
    Hi,

    It seems you have configured the Unity merge tool for YAML files in your Plastic client but the tool path is not existing in your machine.

    We need to set the new path for this tool if you plan to use it. Or you can drive in the Plastic GUI --> Preferences --> Merge tools, and remove it from the list (or put it the last in priority order of the merge tools).

    Regarding the path, you can use some valid path where the tool is located. It shouldn't change any recent editor version.

    Regards,
    Carlos.
     
  6. MoonMoritz

    MoonMoritz

    Joined:
    Jan 30, 2022
    Posts:
    18
    The tool only exists in my Editor Directories (per version, not global).
    I use Unity Hub and have a custom install location set for editors.

    Not sure which Unity Installer still puts stuff in C:\Program Files\Unity, probably a standalone installer, but not hub. Hub always creates subdirectories, regardless of install location.
     
  7. carlosalba1985

    carlosalba1985

    Unity Technologies

    Joined:
    Jul 19, 2021
    Posts:
    841
    Hi, after checking with the team, Plastic finds the exe location and configures the client.conf according to it.
    Then, if you remove and install another version you will need to fix the path in the client.conf.
     
  8. kdchabuk

    kdchabuk

    Joined:
    Feb 7, 2019
    Posts:
    47
    Since Unity owns Plastic/UVCS too, please consider a feature to automatically find UnityYAMLMerge.exe based on the paths defined in Unity Hub. Or ship UnityYAMLMerge.exe with UVCS.
     
    carlosalba1985 likes this.