Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice
Unity's version control component has been upgraded to Plastic SCM.

Collab still seems to fall apart if you move files in your project

Discussion in 'Unity Collaborate' started by jwvanderbeck, Jul 17, 2017.

  1. jwvanderbeck

    jwvanderbeck

    Joined:
    Dec 4, 2014
    Posts:
    825
    This is something that I keep running into when reorganizing things, and it is still occurring in 2017.2b. Call me silly but this seems like the sort of thing that should just work, but anytime I move files around in my project and sync with Collab it just falls apart. some files get moved some don't. and that's if I'm lucky. When I'm unlucky, Collab will completely fail to either push or pull.

    Is this an area that is going to get some love?
     
  2. Ryan-Unity

    Ryan-Unity

    Joined:
    Mar 23, 2016
    Posts:
    1,993
    @jwvanderbeck We're always looking to improve the Collab experience. Can you list some examples of moves that you're performing (size/types/number of files, whether you're moving them, renaming them, re-casing them, etc) that aren't doing what you expect them to?
     
  3. jwvanderbeck

    jwvanderbeck

    Joined:
    Dec 4, 2014
    Posts:
    825
    On my Macbook I had an initial skeleton with folders as follows:
    Assets/Scripts/PlainDataObjects

    In that was about 10 .cs files.

    I synced that with Collab to my Windows PC, and last night while working on the Windows PC I added some new files and rearranged some things.

    I created the following folders:
    Assets/Scripts/PlainDataObjects/Properties
    Assets/Scripts/PlainDataObjects/Properties/Base
    Assets/Scripts/PlainDataObjects/Properties/Derived

    I then MOVED (inside the editor) 4 .cs files from Assets/Scripts/PlainDataObjects to Assets/Scripts/PlainDataObjects/Properties/Base, and the other 6 cs files to Assets/Scripts/PlainDataObjects/Properties/Derived. Additionally I created 3 new cs files directly in Derived.

    I then pushed all that to Collab and this morning pulled to my Macbook again. When I looked at things on my Macbook, the new folders were there, and the 3 files I had created in the Derived folder were present where they should be, but the original 10 files were now in a strange state. The 10 original files were all still present in the original location, Assets/Scripts/PlainDataObjects, AND there 3 of them, which had been modified on the Windows PC while in the NEW location, were also in their new location.
     
  4. Ryan-Unity

    Ryan-Unity

    Joined:
    Mar 23, 2016
    Posts:
    1,993
    Yikes, that is definitely not intended behavior! Thank you for providing such detailed repro steps! We'll start working on a fix for this soon after we verify we can reproduce the issue. If you run across any more weird/unexpected behavior, please let us know!
     
  5. jwvanderbeck

    jwvanderbeck

    Joined:
    Dec 4, 2014
    Posts:
    825
    Hi Ryan,

    I notice that when looking at the "Timeline" in the Collab dashboard, there doesn't seem to be any indication of a file being moved. Is that deliberate? Just hidden? Looking at the two commits I talk about above, this is what I see:

    FIRST COMMIT
    /Assets/Scripts/PlainDataObjects/
    • Added ForceProperty.cs
    • Added ForceProperty.cs.meta
    • Added LengthProperty.cs
    • Added LengthProperty.cs.meta
    • Added MassProperty.cs
    • Added MassProperty.cs.meta
    • Added PhysicalBoolProperty.cs
    • Added PhysicalBoolProperty.cs.meta
    • Added PhysicalFloatProperty.cs
    • Added PhysicalFloatProperty.cs.meta
    • Added PhysicalProperty.cs
    • Added PhysicalProperty.cs.meta
    • Added PhysicalStringProperty.cs
    • Added PhysicalStringProperty.cs.meta
    • Added PropertyQuantityType.cs
    • Added PropertyQuantityType.cs.meta
    • Added TemperatureProperty.cs
    • Added TemperatureProperty.cs.meta
    • Added TimeProperty.cs
    • Added TimeProperty.cs.meta
    SECOND COMMIT
    /Assets/Scripts/PlainDataObjects/Properties/Base/
    • Added PhysicalBoolProperty.cs
    • Added PhysicalBoolProperty.cs.meta
    • Added PhysicalFloatProperty.cs
    • Added PhysicalFloatProperty.cs.meta
    • Added PhysicalStringProperty.cs
    • Added PhysicalStringProperty.cs.meta
    /Assets/Scripts/PlainDataObjects/Properties/Derived/
    • Added BulkheadTypeProperty.cs
    • Added BulkheadTypeProperty.cs.meta
    • Added ChoiceProperty.cs
    • Added ChoiceProperty.cs.meta
    • Added TrueFalseProperty.cs
    • Added TrueFalseProperty.cs.meta

    Now what I am *not* seeing here is an indication of the files being moved, in fact the second commit doesn't show any mention at all of the files that were moved. It just shows new files ( I presume that is what Added means ) for the coule that were moved and then modified.
     
  6. scottlaforge

    scottlaforge

    Joined:
    Mar 12, 2013
    Posts:
    42
    I can confirm similar behavior over and over again with Collaborate, especially if there's assets that go into a "Plugins" folder. Here's an example that I'm struggling with at this moment:

    1. I chose to update my Dissonance asset package from v1.1.1 to v2.0.0.
    2. When originally importing v1.1.1, it had files that were imported into a "Plugins" folder and files imported into a folder with its name, "Dissonance."
    3. For organizational purposes, we have a folder called, "External Assets," and we place any third party assets there. When an asset imports its files into multiple folders, we move them around to contain them under one folder in the "External Assets" folder. So in this case, we made a "Plugins" folder inside of the "Dissonance" folder. We then move all of the files from the original "Plugins" folder into the new one.
    4. We then add the version number to the folder name and commit it all via Collaborate.
    5. TO upgrade to the new version, I deleted the entire v1.1.1 folder and committed it via Collaborate.
    6. I then imported the new version, v2.0.0, and like above, went through the same process of organization.
    7. Later, I open a second copy of the project on a second computer and do an Update. I realize that the v1.1.1 Plugins folder could not be deleted and is ready to be Published. Meanwhile my other computer copy shows all is good.
    8. Then it starts spiraling from there. I try to roll back from v2.0.0 back to v1.1.1 and now the new v2.0.0 Plugins folder cannot be deleted and keeps wanting to be committed to the repository.

    Any thoughts?
     
  7. Ryan-Unity

    Ryan-Unity

    Joined:
    Mar 23, 2016
    Posts:
    1,993
    @jwvanderbeck I'm really sorry for the late reply! I tried to repro your exact scenario and didn't come across the same result that you saw. But I can see that something went wrong just by going off of your Timeline. Here's my last commit where I tried to mimic your last operation as best I could using default scripts but changing their names to match yours. To summarize the actions of this commit, I added the Properties, Properties/Base and Properties/Derived folders. Then moved 4 files into Base, 6 into Derived and added 3 new scripts in Derived. Finally, I added a line of code to MassProperty.cs, TemperatureProperty.cs, and TimeProperty.cs. My commit looks like this:

    MY SECOND COMMIT
    /Assets/Scripts/PlainDataObjects/
    • Deleted MassProperty.cs
    • Added Properties.meta
    • Deleted TemperatureProperty.cs
    • Deleted TimeProperty.cs
    /Assets/Scripts/PlainDataObjects/Properties/
    • Added Base.meta
    • Added Derived.meta
    /Assets/Scripts/PlainDataObjects/Properties/Base/
    • Moved PhysicalBoolProperty.cs
    • Moved PhysicalBoolProperty.cs.meta
    • Moved PhysicalFloatProperty.cs
    • Moved PhysicalFloatProperty.cs.meta
    • Moved PhysicalProperty.cs
    • Moved PhysicalProperty.cs.meta
    • Moved PhysicalStringProperty.cs
    • Moved PhysicalStringProperty.cs.meta
    /Assets/Scripts/PlainDataObjects/Properties/Derived/
    • Added BulkheadTypeProperty.cs
    • Added BulkheadTypeProperty.cs.meta
    • Added ChoiceProperty.cs
    • Added ChoiceProperty.cs.meta
    • Moved ForceProperty.cs
    • Moved ForceProperty.cs.meta
    • Moved LengthProperty.cs
    • Moved LengthProperty.cs.meta
    • Added MassProperty.cs
    • Moved MassProperty.cs.meta
    • Moved PropertyQuantityType.cs
    • Moved PropertyQuantityType.cs.meta
    • Added TemperatureProperty.cs
    • Moved TemperatureProperty.cs.meta
    • Added TimeProperty.cs
    • Moved TimeProperty.cs.meta
    • Added TrueFalseProperty.cs
    • Added TrueFalseProperty.cs.meta

    Normally, when a file is both moved and edited, Collab registers them as an Add+Delete operation, where the old version of the file deleted from where it used to be located and the edited version is added to the new location. The other untouched scripts should be just listed as Moved. I also noticed that your newly created folders aren't listed in your commit's change list. That's very bizarre.

    I know this all happened over a week ago, but do you remember if you created the folders inside of the Editor too? Also, which version of the Editor were you using when you ran into these issues?
     
  8. Ryan-Unity

    Ryan-Unity

    Joined:
    Mar 23, 2016
    Posts:
    1,993
    Hi @scottlaforge! I'm so sorry for taking so long to respond to you! Are you still experiencing these issues?

    Do you happen to have a copy of your project that you would be willing to share with me, even if it's just with the External Assets folder? It would be great if you could also share with me the older version of the Dissonance plugin too. I'd like to try and repro this bug but I'm having trouble doing that without the older version of a plugin to work with.
     
  9. jwvanderbeck

    jwvanderbeck

    Joined:
    Dec 4, 2014
    Posts:
    825
    Yes the folders would have been created in the editor. I try to avoid doing any of those types of operations outside the editor.

    As for the version, I am not 100% certain. Most likely either 2017.1 or 2017.2b. We are on 2017.2b right now.
     
  10. Ryan-Unity

    Ryan-Unity

    Joined:
    Mar 23, 2016
    Posts:
    1,993
    Thanks for the update!

    Would you mind messaging me your project's UPID so that we can look at what's happening on the server side?
     
  11. jwvanderbeck

    jwvanderbeck

    Joined:
    Dec 4, 2014
    Posts:
    825
    Where would I get that from?
     
  12. Ryan-Unity

    Ryan-Unity

    Joined:
    Mar 23, 2016
    Posts:
    1,993
    With your project open in Unity, you can open the Services window and go to the Settings tab to see your Unity Project ID.
     
  13. freejsf

    freejsf

    Joined:
    Aug 24, 2015
    Posts:
    4
    Are there any news on this issue? I am experiencing the same problem, after having moved some files in the edtitor to a new folder. (using 2018.1)
     
  14. Ryan-Unity

    Ryan-Unity

    Joined:
    Mar 23, 2016
    Posts:
    1,993
    Hey @freejsf! I'm sorry to hear that you're still running into this issue around moving files. Could you get in touch with our Support Team so that we can figure out why you're running into this issue? A small sample project that can consistently reproduce the issue would be extremely helpful.
     
  15. Rich_A

    Rich_A

    Joined:
    Nov 22, 2016
    Posts:
    338
    Still having the same problems with Unity 2017.4.16 LTS.

    • e13c13c8-f069-40bc-b9e0-3b956f158a53
    Just moving files around, renaming some. Nothing fancy. Lost about a week's effort with all the hassle of fixing it.

    Does Github or other version control providers have the same problem? Something that is a paid feature so heavily integrated into the Editor should work better than this.