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. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice
Unity's version control component has been upgraded to Plastic SCM.

Feedback [BUG] Invalid command line using Collaborate and WinMerge

Discussion in 'Unity Collaborate' started by AlanMattano, Dec 24, 2018.

  1. AlanMattano

    AlanMattano

    Joined:
    Aug 22, 2013
    Posts:
    1,500
    Unity 2019.1 and earlier Vr of U. Windows 10

    Issue:
    When calling WinMerge using Unity Collab button to compare a file,
    the default 3rd File or Folder Option is invalid. The 3rd field contains "U:\e".
    And is difficult for a beginner to understand why the Compare button is not working since is deactivated as shown in this screen-shoot

    Problem.jpg

    Solution:
    In the input field take out "U:\e" and live it empty. The button will return visibly.

    Bug:
    As shown in the attached file, the command line option for starting WinMerge from Unity is invalid. (For example, \e must be /e or -e


    UnityBug.png
    Looks like is missing an open "

    I have done a bug report. As soon I get a tracking number, I will pas it here.
     
    Last edited: Dec 24, 2018
  2. Ryan-Unity

    Ryan-Unity

    Unity Technologies

    Joined:
    Mar 23, 2016
    Posts:
    1,993
    AlanMattano likes this.
  3. MattT5

    MattT5

    Joined:
    Dec 7, 2017
    Posts:
    48
    Hi @ryanc-unity, how 'actively' is actively? This problem is still present when using Winmerge with Unity 2018.3.7f1.

    The issue you link to now states: "Due to the age of this issue, and since YAMLMerge is in the process of being replaced by a newly revamped merging system, our team has decided to close this issue as Won't Fix."

    Do you have any ETA on replacing YAMLMerge?

    Thanks,
    Matt
     
  4. softone

    softone

    Joined:
    Oct 25, 2013
    Posts:
    8
    A while back, I also reported this bug, but they insisted WinMerge should be fixed instead.
     
  5. MattT5

    MattT5

    Joined:
    Dec 7, 2017
    Posts:
    48
    That seems a bit harsh. I am assuming here, but: WinMerge defines its command-line parameters format, Collaborate does not respect this format, WinMerge has to be fixed?

    What say you, Unity?
     
  6. AlanMattano

    AlanMattano

    Joined:
    Aug 22, 2013
    Posts:
    1,500
    I report this bug to WinMerge first as an issue. They make an investigation and they answer negative (that is a Unity side bug).
     
  7. AlanMattano

    AlanMattano

    Joined:
    Aug 22, 2013
    Posts:
    1,500
  8. Ryan-Unity

    Ryan-Unity

    Unity Technologies

    Joined:
    Mar 23, 2016
    Posts:
    1,993
  9. MattT5

    MattT5

    Joined:
    Dec 7, 2017
    Posts:
    48
    Thanks for the update, Ryan! I actually went back to WinMerge 2.14.0.0, which does not yet have a third file option. This works fiine for looking at the diff, but you cannot save any changes you make to your local file, because it then reports that 'c:\e' is not valid. And now I know WHY ;)
     
  10. AlanMattano

    AlanMattano

    Joined:
    Aug 22, 2013
    Posts:
    1,500
    As I mention at the top, to use latest WinMerge you (user) need to just remove "U:\e" from the input field. At that point, the button will return visibly!

    Solution:
    In the input field take out "U:\e" and live it empty. The button will return visibly.
     
  11. BihtSift

    BihtSift

    Joined:
    Aug 25, 2017
    Posts:
    13
    A good workaround would be to setup the command line yourself using the "Custom Tool" selection in the Revision control diff/merge dropdown, but I can't for the life of me find any documentation as to what macros to use to make this work.

    upload_2020-2-14_22-48-13.png

    I've tried $1 %1 %left% etc. I'm still guessing to figure it out. Anyone know?
     
    AlanMattano likes this.
  12. BihtSift

    BihtSift

    Joined:
    Aug 25, 2017
    Posts:
    13
    Found my answer here: https://docs.unity3d.com/2020.1/Documentation/Manual/Preferences.html

    I overlooked it before. There's a nice table:
    To specify file layout in the revision tool, use these arguments:


    Property
    Function
    #LTITLE Left title
    #RTITLE Right title
    #ATITLE Ancestor title
    #LEFT Left file
    #RIGHT Right file
    #ANCESTOR Ancestor file
    #OUTPUT Output file
    #ABSLEFT Absolute path to the left file
    #ABSRIGHT Absolute path to the right file
    #ABSANCESTOR Absolute path to the ancestor file
    #ABSOUTPUT Absolute path to the output file
     
    AlanMattano, MattT5 and Ryan-Unity like this.
  13. Arlorean

    Arlorean

    Joined:
    Sep 7, 2014
    Posts:
    26
    In case this is useful, here are the WinMerge (V2.6.10.0 x64) two-way diff command line args I'm using:

    /e /u /wl /dl #LTITLE /dr #RTITLE #LEFT #RIGHT

    upload_2021-2-3_15-49-59.png

    /e - Allow escape to close editor
    /u - Don't add files to the most recently used list in WinMerge
    /wl - The left file is read-only
    /dl - Left title
    /dr - Right title
     
    AlanMattano and langecrew like this.
  14. langecrew

    langecrew

    Joined:
    Feb 5, 2021
    Posts:
    1
    Dude, thank you for that. Getting two programs to play nicely is always so much easier with an example. Cheers
     
    AlanMattano likes this.
  15. AlanMattano

    AlanMattano

    Joined:
    Aug 22, 2013
    Posts:
    1,500
    Is this bug fixed?
    I'm just double-checking for quality control ;)