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

Wise SVN - Powerful TortoiseSVN / SnailSVN Integration

Discussion in 'Assets and Asset Store' started by NibbleByte3, Mar 10, 2020.

  1. NibbleByte3

    NibbleByte3

    Joined:
    Aug 9, 2017
    Posts:
    81


    Simple but powerful SVN Integration for Unity 3D utilizing TortoiseSVN (for Windows) or SnailSVN (for MacOS) user interface. A must have plugin if you use SVN as your version control system in your project.

    Prerequisites:
    • Have SVN installed
      • Have installed SVN command line interface (CLI)
    • (Optional) Have TortoiseSVN (for Windows) or SnailSVN (for MacOS) installed.

    Features:
    • Hooks up to Unity move and delete file operations and executes respective svn commands to stay in sync.
      • Handles meta files as well.
      • Moving assets to unversioned folder will ask the user to add that folder to SVN as well.
      • Moving folders / files that have conflicts will be rejected.
      • Will work with other custom tools as long as they move / rename assets using Unity API.
    • Provides assets context menu for manual SVN operations like commit, update, revert etc.
    • Show overlay svn status icons
      • Show server changes that you need to update.
      • Show locked files by you and your colleges.
    • Auto-Lock assets by path and type
      • Modified files (asset or meta) that match specified path and type will be automatically locked.
      • When files are locked by someone else a prompt will be shown allowing users to steal the lock by force.
      • When file changes are cleared, they will be unlocked automatically.
    • Branch Selector
      • Scans for Unity projects in your SVN repository's branches.
      • Lists all available branches.
      • Opens Repo-Browser showing target asset in selected branch.
      • Opens "Show Log" on target asset in selected branch.
      • Switches to selected branch.
      • Scans for conflicts (shows which branches have changes to the target asset).
    • Minimal performance impact
    • Survives assembly reloads
    • You don't have to leave Unity to do SVN chores.
    • Works on Windows and MacOS (maybe Linux?).
    • • Simple API to integrate with your tools.
    Usage:
    • Do your file operations in Unity and the plugin will handle the rest.
    • User SVN operations are available in the menu (or right-click on any asset): Assets/SVN/...
    Download:



    WARNING: Never focus Unity while the project is updating in the background. Newly added asset guids may get corrupted in which case the Library folder needs to be deleted.
    Preferred workflow is to always work inside Unity - use the "Assets/SVN/..." menus. "Assets/SVN/Update All" will block Unity while updating, to avoid Unity processing assets at the same time.
    This is an issue with how Unity works, not the plugin iteself. Unity says its by "design".
     
    Last edited: Sep 18, 2020
    Lars-Steenhoff and Graham-B like this.
  2. Froghuto

    Froghuto

    Joined:
    Oct 4, 2012
    Posts:
    61
    This is looking great, thanks for this asset!
    One problem I have are with SVN Externals - right now they give error messages and break the overlay icon integration
    Also, is it possible to get the current lock owner (svn username, you can get it via svn info)? I want to create a tool that basically shows in the scene view for the currently open scene/prefab if it is locked and if so by whom. Right now I can only find out if a file is locked by me or someone else, but not the actual username.
    And one more thing, it would be great if you would expose the commit, lock, etc methods so we could use those from code (and please also expose the "with .meta file" parameter).
    And finally let me say thank you again, I'm really glad there is a great working and maintained SVN plugin again :)
     
    Last edited: Apr 7, 2020
  3. NibbleByte3

    NibbleByte3

    Joined:
    Aug 9, 2017
    Posts:
    81
    We don't use externals, so I didn't add support for it. Now that you've mentioned it, I tried it out and made some fixes. If your error was on the line:
    statusData.Status = m_FileStatusMap[line[0]];
    I've fixed it with my last two commits at github. You can get them and try it out, let me know if you find new issues. You'll need to restart Unity when applying the update.

    I didn't know that. Thanks! :D I didn't see it in the "svn status -u" so I gave up quickly. I will try to add it in the SVNStatusData struct this weekend maybe.

    I added locks a bit late and didn't have the time to add more features for it. I too was planning on displaying the lock owner on the scenes / prefabs. Another thing I want to add is a simple window that shows everything you have locked. That window will pop up on Unity start up to remind you of your locks. And maybe show other locks as well, I dunno.

    You're talking about making SVNContextMenusManager methods public? Yes, I was thinking of doing that (in fact the Update method is public and takes arguments, cause we needed it :D ). It still feels weird, some other tools to call "Commit" method just to pop up TortoiseSVN window (not to actually do commit in the background), but I guess it could come in handy.

    Offtopic: we don't use locks. artists wanted it, but kind of managed without locks. I have doubts that locks would have helped at all. Do your team use locks? How do they cope with that?
     
    Last edited: Apr 9, 2020
  4. Froghuto

    Froghuto

    Joined:
    Oct 4, 2012
    Posts:
    61
    Thanks for your update, Externals no longer throw any errors!
    As for the public SVNContextMenusManagermethods - we have big buttons in the sceneview to start an update all and commit all so it's easier and faster to work with SVN from within Unity, so it's basically just a more visible and faster to access menu entry. And since we use externals (we have some code that is shared between projects) we also have a button to start a commit on just the externals folder without the .meta (since you need to commit externals seperately).

    As for locking, the people in our company often had problems of editing the same scenes/prefabs, so I made a little overlay/button for the scene view that is really "in your face". It allows you to lock the currently open scene/prefab, and also shows the current lock status so you never accidentally work on a scene/prefab someone else is currently working on (when someone else has a lock the rectangle is also bright red :) :https://i.imgur.com/NOVkmgs.gifv
    That works fairly well for us.
     
    Last edited: Apr 9, 2020
  5. Froghuto

    Froghuto

    Joined:
    Oct 4, 2012
    Posts:
    61
    I checked out the github repo and saw the async methods - it would be great if you could also make the checks for repository changes async? We're working remotely right now and had a problem with our SVN server, and since the checks are not async at the moment it froze Unity more or less completely.
     
  6. NibbleByte3

    NibbleByte3

    Joined:
    Aug 9, 2017
    Posts:
    81
    I wanted to do some more API improvements before I write back, but it seems you saw my changes till now.
    Yeah, I have added LockFile() and UnlockFile() methods (with Async counterparts). I have also added method FetchLockDetails() to fetch lock details (owner, message, date) with an Async version as well. You can use it to get lock details for a file you know it is locked.

    By "checks for repository changes" I assume you want to get some file status (to check if it is locked or something) from code by calling
    WiseSVNIntegration.GetStatus("Assets/SomeFile.prefab");
    This version of the method is synchronous, but offline (won't do requests to your repo, so it shouldn't be slow depending on your HDD).

    If you're using the
    WiseSVNIntegration.GetStatus("Assets/SomeFile.prefab", new SVNStatusDataOptions() { Offline = false, FetchLockOwner = true } );
    method, that might freeze the editor, yes. So in this case, GetStatusAsync() could be useful, I agree. Will add one tomorrow.

    If that is not the case, I have no idea what could be slowing down your editor. All long online operations operations are offloaded onto another thread (mainly the SVN status database). Editor file operations (move / delete etc...) are synchronous but offline.

    Also keep in mind that these changes haven't gone through extensive testing. I try testing every possible case I can think of, but I may miss some. Also, I didn't have access to MacOS these days and I have no guarantee that it is stable there. Will test it tomorrow probably.

    Cheers :)
     
    Froghuto likes this.
  7. Froghuto

    Froghuto

    Joined:
    Oct 4, 2012
    Posts:
    61
    Regarding the error I mentioned, at first I thought it was in relation to the automatic check for repository changes from your plugin, but it turns out it was a usage in my code where I was calling GetStatus to check if a file is locked.

    Thank you again for your work, with your latest changes this SVN plugin is perfect for our needs!
     
  8. NibbleByte3

    NibbleByte3

    Joined:
    Aug 9, 2017
    Posts:
    81
    I have added GetStatusAsync() version that should help you with your freezes. You can specify if it should retrieve lock details as well.

    I will do some more API improvements later on and will publish everything to the asset store.
     
    Froghuto likes this.
  9. NibbleByte3

    NibbleByte3

    Joined:
    Aug 9, 2017
    Posts:
    81
    I have published all changes in the Assets Store - version v1.1.0.

    The API changed a bit but I believe it is now more consistent.
    I have added other SVN operations like Commit, Update, Add (with Async versions) to integrate with your tool.

    Cheers.
     
    Froghuto likes this.
  10. Froghuto

    Froghuto

    Joined:
    Oct 4, 2012
    Posts:
    61
    I stumbled upon an edge case - when I try to "GetStatus" on a file that is in a new folder that is not under version control the command output of svn status will be:
    svn: warning: W155007: 'Assets\ScriptableObjects\NewFolder\New.asset' is not a working copy

    Would it be possible (and make sense?) that the call to GetStatus etc will return a status of "Unversioned"?
     
  11. NibbleByte3

    NibbleByte3

    Joined:
    Aug 9, 2017
    Posts:
    81
    Hmmm... are you sure you have the latest version? I tested it using this code and it works no matter how folder-deep the unversioned file is:
    Code (CSharp):
    1. [MenuItem("Assets/Status")]
    2.     private static void GetStatus()
    3.     {
    4.         var path = AssetDatabase.GetAssetPath(Selection.activeObject);
    5.         var statusData = WiseSVNIntegration.GetStatus(path);
    6.  
    7.         Debug.Log($"{statusData.Status} - {statusData.IsValid} - {statusData.Path}");
    8.     }
    9.  
    In the GetStatus there is a check for this which ensures Unversioned is returned:
    Code (CSharp):
    1.  
    2.             // If no path was found, error happened.
    3.             if (!statusData.IsValid) {
    4.                 // Fallback to unversioned as we don't touch them.
    5.                 statusData.Status = VCFileStatus.Unversioned;
    6.             }
    7.  
    is not a working copy
    sounds like the project is not under version control. Check if you have the .svn folder? Or if relative paths work correctly (if you somehow ran Unity project in another working folder?!).
     
    Last edited: Jul 29, 2020
  12. Froghuto

    Froghuto

    Joined:
    Oct 4, 2012
    Posts:
    61
    Wow, I just did not realize there's a IsValid field. Thanks!
     
  13. tosiabunio

    tosiabunio

    Joined:
    Jun 29, 2010
    Posts:
    115
    Any idea why icon overlays are not showing up? I'm using 2019.4.7.
     
  14. NibbleByte3

    NibbleByte3

    Joined:
    Aug 9, 2017
    Posts:
    81
    If assets have no changes, no overlay icon is shown. This was a design choice although I may add option to show the green circle. Try modifying your files in some way. Unversioned files do have icons.

    Also check if they are enabled in the "SVN/SVN Preferences" menu.

    Overlay icons fail silently to avoid spam. Check if your SVN is setup correctly, especially username and password. Try doing some SVN operation in Unity like renaming or deleting asset. If something is wrong WiseSVN will pop up a message and log the problem. WiseSVN basically runs this to get the icon status:
    svn status --depth=empty -u foo.png
    . You can try running this in cmd and investigate the problem.

    I've just tested it out with Unity 2019.4.7f and it seems to work.

    If you still have this issue, try setting the "Trace Logs" preference to "All" and check the logs to see if the database is initialized properly.

    Offtopic: I like the Beat Cop game :D
     
    Last edited: Aug 6, 2020
    tosiabunio likes this.
  15. NibbleByte3

    NibbleByte3

    Joined:
    Aug 9, 2017
    Posts:
    81
    Released version v1.2.0. Here is what it adds.

    Branch selector

    Shows all your branches in a single window.
    User can select target asset and check info about it in the other branches.
    It requires some initial setup to work (tell WiseSVN what should be considered as branch).

    Diff / Resolve Context Menu
    Opens TortoiseMerge window on the asset or it's meta file if they have changes or resolve window if asset has conflicts. Can be used only with single asset selected.


    Normal Status Icon
    Added option to show green normal status icon for unchanged versioned files (TortoiseSVN)



    And some other bugfixes and a bit of refactor.
     
    Graham-B and tosiabunio like this.
  16. NibbleByte3

    NibbleByte3

    Joined:
    Aug 9, 2017
    Posts:
    81
    Released version 1.3.0. Here is what it adds.

    Auto-Locking
    Shot-8-Auto-Locking.png This feature can help you avoid conflicts when working on the same assets (in the same branch).
    When configured properly it will lock any file that has changes and matches the preferences description.
    It will do this even on Unity startup. It will clear the lock if file status becomes normal (no changes).
    If the file you modified is locked by someone else, a window will pop up prompting the users for action.
    After reviewing what assets are locked and communicating this with their team, users can forcefully steal the lock from others or skip locking at all. User won't be asked twice (until Unity restart) for their decision.

    Note: meta files matching the preferences description are auto-locked too. Deleted files as well.

    "Get Lock" and "Release Lock" context menu has been improved as well along the way.

    And as usual - bug-fixes and improvements.
     
    tosiabunio likes this.
  17. NibbleByte3

    NibbleByte3

    Joined:
    Aug 9, 2017
    Posts:
    81
    Released hot-fix version 1.3.1. Here is what it fixes:
    • CRITICAL FIX: WiseSVN caused Unity to hang forever if the CLI requested user input (prompt for password or something). If your Unity hung on recompile / enter play / exit it might be because of this.
    • Added AuthenticationFailed value to operation result enums.
    • Don't run SVNBranchesDatabase & SVNStatusesDatabase if application is in batch mode or editor is currently building.
     
    Last edited: Sep 28, 2020
  18. NibbleByte3

    NibbleByte3

    Joined:
    Aug 9, 2017
    Posts:
    81
    Released hot-fix version 1.3.2. Here is what it fixes:
    • CRITICAL FIX: WiseSVN logged error about missing GUID for moved or deleted assets. Auto-locking feature didn't work well with those too.
    • Overlay icons did not show if Auto-Locking was disabled.
     
  19. NibbleByte3

    NibbleByte3

    Joined:
    Aug 9, 2017
    Posts:
    81
    Released version 1.3.4. Here's what it fixes:
    • Fix: no replace overlay icon was shown.
    • Better sanitization for folder preferences. Replace \ with / and trim the slashes. Better hints for that.
    • Fixed: empty guid errors for deleted files in deleted folder.
     
  20. vinmred

    vinmred

    Joined:
    Jun 25, 2018
    Posts:
    3
    Is there a tutorial on how to set up Wise SVN? It does not seem possible to do the initial set up of SVN project without doing it from outside of Unity - ie Import to repository first and then doing the checkout externally.
     
  21. NibbleByte3

    NibbleByte3

    Joined:
    Aug 9, 2017
    Posts:
    81
    Sorry, at the moment, Wise SVN expects the project to be checked out and ready. This is done easily with TortoiseSVN / SnailSVN, which is something that Wise SVN also relies on. And they have much better interface than I could do and support :D Therefore, Wise SVN is not a full standalone SVN solution for Unity (well, if you don't have TortoiseSVN / SnailSVN, file operations will still work, but context menus won't).
     
  22. NibbleByte3

    NibbleByte3

    Joined:
    Aug 9, 2017
    Posts:
    81
    Released version 1.3.5. Here is what it fixes:
    • Support missing timeline package (for 2019 etc)
    • Make the SVNStatusesDatabase pick only Added, Normal & Conflicted when the sanity limit is reached. If that again exceeds the limit, skip everything and start with the Warnings.
    • Fixed: changes in Preferences window did not stick to list elements for Unity 2020, caused by the new reorderable list.
    • Aggregated errors into a single message on the next frame. Also users can opt out from error messages and some other prompts.
    • Added revert operation (for tools)
    • Handle command exceptions on startup with proper message and WiseSVN disable. Additional OSX hint about brew installed svn.
     
    Last edited: Apr 12, 2021
  23. NibbleByte3

    NibbleByte3

    Joined:
    Aug 9, 2017
    Posts:
    81
    Released version 1.3.6. Here is what it fixes:
    • Added sanity checks for remote server having too much changes as well.
     
  24. BoteRock

    BoteRock

    Joined:
    Jan 10, 2013
    Posts:
    9
    I just found this, and I want to thank you for the awesome work you have done <3
     
    NibbleByte3 likes this.
  25. ADovichi

    ADovichi

    Joined:
    Aug 23, 2020
    Posts:
    2
    Hi! Hoping to be able to use this tool as it seems like it'll be exactly what I need, but I get this error anytime I try to do something from the right-click menu.


    SVN Error: System.ComponentModel.Win32Exception (0x80004005): ApplicationName='TortoiseProc.exe', CommandLine='/command:add /path:"Assets/DevLocker"', CurrentDirectory='', Native error= The system cannot find the file specified.

    I had installed it before I had the SVN CLI installed, noticed I did that the installed the SVN CLI, deleted and re-imported Wise SVN but still get this error.

    I've verified that when I open cmd and ruh "tortoiseproc.exe", the TortoiseSVN Project Manage opens fine.

    Any ideas?

    Thanks!
     
  26. NibbleByte3

    NibbleByte3

    Joined:
    Aug 9, 2017
    Posts:
    81
    That is really odd. If you manage to run "tortoiseproc.exe" from cmd, it means it was properly added to your PATH environment variable, so executing it from Unity (or anywhere) should work.
    Did you try restarting Unity or your whole PC after installing the SVN CLI tools? Unity might still have the old set of environment variables.
    How do you start Unity? Using Unity Hub? If you use some other means, it may start Unity with wrong or orveriden environment variables.
     
  27. ADovichi

    ADovichi

    Joined:
    Aug 23, 2020
    Posts:
    2
    System restart did the trick, thanks for the quick help!
     
  28. NibbleByte3

    NibbleByte3

    Joined:
    Aug 9, 2017
    Posts:
    81
    Released version 1.4.0. Here is a brief change log:
    • Rename "Auto-Locking" to "Lock Prompt". SVN auto locking now is done explicitly by the user. By default, stealing locks is disabled and user has to manually enable it. Auto-unlocking is a project preference now.
    • Lock prompt window now displays assets that are out of date. User is informed that they need to update and those assets can't be locked.
    • Display warning in the SceneView (as an overlay) when the current scene or edited prefab is out of date or locked.
    • PromptLock window now displays the asset to be clicked on, when the original target is meta.
    • Made much better checks if svn.exe is available, especially for OSX. If binaries are not found for OSX it will search for them in the usual places.
    • Added personal preference for SvnCLIPath. SvnCLIPath can now be absolute or relative.
    • Enable the DownloadRepositoryChanges project preference by default.
    • Make context menu Revert operation wait for it to finish.
     
  29. HaMMMMer

    HaMMMMer

    Joined:
    Oct 25, 2021
    Posts:
    9
    Hi NibbleByte3, reallllly thank you for making this amazing tool! But after playing around with it I got an issue that all the un-versioned files start to using the same overlay icon with normal stage icon(green check mark) instead of the question mark. And the out of date icon sames only working for several folders, like I am sure there are some out of date files in folder A, but the whole folder A all showing the normal stage Icon. Is there any settings that I am missing or any other suggestions? Looking forward to your reply!
     
    Last edited: Jan 4, 2022
  30. NibbleByte3

    NibbleByte3

    Joined:
    Aug 9, 2017
    Posts:
    81
    Hello,

    What you're seeing is most likely the result of Wise SVN having too much changes to display. You can check this by running the following command in cmd at the root of your project: "svn status -u". There is a hard-coded number in the code that specifies how much overlay icons Wise SVN is allowed to store (cache). That number at the moment is 600 (files + their metas). If that number is reached, Wise SVN removes all unversioned files from the list (considering them as less important). If the number is still higher (which means too many modified files, or ones with remote changes or locks), Wise SVN discards the whole list and logs a warning about it. If it is not in the list with overlay icons, it considers it as "Normal" status (what you see).

    This is done to prevent Wise SVN from slowing down your editor when users have too many changes to display (for example, migrating the project to another Unity version, mass edit of assets, etc.). This is normally considered abnormal behaviour and having more than 600 changes should be discouraged (unless some migration is happening). I admit that this hidden rule is a bit unclear and confusing, but I haven't found a good way to communicate this to the user without being annoying. I'm open for suggestions. :)

    So, can you please check if:
    • You have a lot of unversioned files pending commits. Maybe you added some asset packs or plugins?
    • You have a lot of locally modified files. Maybe migrating assets?
    • Your repo is out of date and someone has committed a ton of changes. SVN will get that as remote changes and try to put them in the list with overlay icons.
    Please confirm that this is the case and try using TortoiseSVN to check your changes in such a case.

    Cheers and happy new year :)
     
  31. viatech

    viatech

    Joined:
    Dec 6, 2017
    Posts:
    56
    Hi

    I'll start with great Asset and thanks for giving your hard work to the community! :)

    I ran into the 600 un-versioned file limit as I have some large 3D model collections which are not versioned and don't need to be. I added those folders into the "Exclude Paths" section of project preferences, but that made no difference. It would be great if those folders were marked as "ignored" with a different icon from (?) and not processed at all.

    I took a look at the code and I bumped the sanity check limit up to 60000 and found that I had 22769 un-versioned items which was correct. So I dug a little deeper in the SVNStatusesDatabase.cs
    Code (CSharp):
    1.                
    2. // Statuses for entries under unversioned directories are not returned. Add them manually.
    3. if (statusData.Status == VCFileStatus.Unversioned && Directory.Exists(statusData.Path)) {
    4.  
    This bit I didn't get. AFAIK you can't version a file in an un-versioned folder you'll get a node not found error. So IMHO there's no point in going any further down the tree just to put the (?) against each item. So I commented out that whole for loop (starting at line 125) and the "statuses.Count" is now at 139. :)

    I also noticed I have a top level versioned folder which is showing up as un-versioned even though its contents are showing as unchanged (green Tick). I checked [svn status] and sure enough it is versioned but the .meta file is not. Perhaps that situation could show a different status icon.


    Cheers
    Mark
     
  32. NibbleByte3

    NibbleByte3

    Joined:
    Aug 9, 2017
    Posts:
    81
    If you need such a folder with tons of assets, wouldn't it be better if you just add it to the svn ignore list, similar to what you do with your Library folder? Keep in mind that even if you don't see overlay icons in Unity, you'll see them in the TortoiseSVN commit window every time. Ignored assets are displayed as normal status, not unversioned.

    About the "Exclude Paths" - makes sense to hide overlay icons for them. I may add it - it will not show normal status (green icon) nor unversioned one. This feature was initially intended for folders with assets that you mass-generate with a tool and don't want delete/add svn operations in there.

    You are correct, calling "svn status" inside unversioned folder returns error. Calling "svn status" on the root folder will return only top-most unversioned items, no recursion. This is why I dig recursively in the unversioned folders and manually collect any assets placing them in the "m_Data" list. If status for given asset is not found by the GetKnownStatusData() method it is considered as normal (green icon). Having 20k entries in that list may cause performance issue (it's a list, not a dictionary to survive the assembly reload).

    I will redo this logic to be a bit more similar to what SVN command does: on "svn status" it will store all unversioned folders in a special list and NOT add assets recursively. GetKnownStatusData() will check if that asset is under any unversioned folder - if so, return unversioned as well. This will massively reduce the "unversioned" entries and improve performance at a tiny cost. So thank you for steering me in the right direction. :)

    This works for any status and is by design. For example if you have a normal fbx with modified meta, user will want to see that there are changes and commit them. If fbx is modified and meta has a conflict, the latter will be shown because it is higher priority. I admit it is not very clear when status is about the meta and when about the asset, but I haven't figured out a better way do display this and is really simple for the user to check what's happening via TortoiseSVN.

    So, expect the changes mentioned above soon... :)
    Cheers
     
  33. HaMMMMer

    HaMMMMer

    Joined:
    Oct 25, 2021
    Posts:
    9
    Thanks for the quick reply, I am now more clear on how the wise svn works, and looking forward to the new features you mentioned:)
     
    Last edited: Jan 4, 2022
  34. NibbleByte3

    NibbleByte3

    Joined:
    Aug 9, 2017
    Posts:
    81
    I did the changes mentioned above (unversioned files rework, exclude paths support). You can get them right now at the upm branch or wait for official release that should come next week.

    I've even added a "proper" warning when overlay icons are skipped: a warning icon next to the "Assets" folder with a proper tooltip explaining the situation.
    upload_2022-1-4_16-58-4.png

    Let me know if you find any issues with the changes.
     
    viatech likes this.
  35. viatech

    viatech

    Joined:
    Dec 6, 2017
    Posts:
    56
    Checked out the latest version - great work! All the folders show up as expected. Now you have the (?) for un-versioned , (|) for changed and nothing for ignored it looks sensible with the green tick on. If the green tick is off in preferences you can't tell which are ignored so not sure whether an icon is needed on the top-level ignored folder or not - your call:) What would be good is to not allow an ignored folder to be versioned (added).

    That's just what I usually do but sadly not on the project I used to test WiseSVN :oops:. On the plus side it gave you some ideas for changes.:D

    Cheers
     
  36. NibbleByte3

    NibbleByte3

    Joined:
    Aug 9, 2017
    Posts:
    81
    I've thought about it and decided to add such an icon. I'm using the TortoiseSVN ReadOnly icon. Here is how it looks:
    upload_2022-1-9_13-45-43.png
    "zWar" is excluded. I've added a preference to turn on/off excluded icons. Icons of the sub-items of excluded folders are displayed only when "Show Normal status green icon" is on. If green icons are off, and excluded are on, only top-most items are displayed (i.e. "zWar" only). This way user can mix both preferences to get the desired result.

    You can get the changes again from the upm branch. Will make a public release this week at some point.


    I can't do this, user can always add them in TortoiseSVN. And they will be displayed in the commit window anyway. WiseSVN exclude is just in Unity, not a real svn-ignore.
     
  37. viatech

    viatech

    Joined:
    Dec 6, 2017
    Posts:
    56
    Looks great! I think that covers all the bases.


    On the subject of not allowing an excluded folder to be added. I get that the user can always do it with svn add or Tortoise, but within Unity I was thinking when they click add from the context menu you check the folder is not in the ignore list and if it is warn or stop them - just a numpty check - not fool proof I grant you.

    Cheers
     
  38. NibbleByte3

    NibbleByte3

    Joined:
    Aug 9, 2017
    Posts:
    81
    I think I'll skip this check for now. This makes only for excluded unversioned folder. But another use (my original thought) was for versioned folder that has many assets generated by a tool. If the tool generated new files, you may actually want to add them. So I'd rather give this responsibility to the user.

    And now, onto the release... :D
     
  39. NibbleByte3

    NibbleByte3

    Joined:
    Aug 9, 2017
    Posts:
    81
    Released version 1.4.2. Here are the changes:
    • Locked overlay now displays who is the item locked by.
    • Added support for nested SVN repositories (checkouts inside the checkout).
    • Reworked how unversioned overlay icons are handled. Icons will no longer disappear when having large number of unversioned files (but they will if you have large number of modified / added files).
    • The exclude list now applies to the overlay icons as well (not just file operations). Special icon is used for excluded items (gray checkmark).
    • Added Warning icon next to the Assets folder when the overlay icons are skipped due to large amount. It has a hint explaining what is happening.
    For more info, check last few posts here.
     
  40. HaMMMMer

    HaMMMMer

    Joined:
    Oct 25, 2021
    Posts:
    9
    Hi NibbleByte3, thanks for your update.
    I just get the latest version, and found:
    1. If unversioned asset in ignore list(add from svn setting), but not in excluded list, those file will show up as normal green icon.
    2. If unversoned asset both in Ignore list and excluded list, it works correct with grey checkmark.

    Is there any settings I can use to avoid the first situation?
     
  41. NibbleByte3

    NibbleByte3

    Joined:
    Aug 9, 2017
    Posts:
    81
    You want to avoid adding every svn-ignored folder into the excluded list manually(which is a project setting). At the moment Wise SVN doesn't collect any svn properties, sadly. I may add it in the near future (putting it on the TODO list, seems simple). So watch this forum for updates.
     
  42. HaMMMMer

    HaMMMMer

    Joined:
    Oct 25, 2021
    Posts:
    9
    Hi NibbleByte3,
    Found a little strange situation after using your tool for a month, that if I click "commit" under the unity top level Assets folder, I will get a Assets.meta file in the commit window, and it will cause submition fail due to Assets.meta is not under versioncontrol. But if clicking "commit all" under any folder, the Assets.meta file will not showing. Have no ideal where is the Assets.meta comes from or am I doing any settings wrong?

    BTW, Reallllllly like your tool, that makes my day, thank you!
     
  43. NibbleByte3

    NibbleByte3

    Joined:
    Aug 9, 2017
    Posts:
    81
    This happens because "Commit" always calls TortoiseSVN with the selected asset + it's meta. When the meta file has no changes it doesn't get displayed to the TortoiseSVN so you won't see it. Which works for normal assets in Unity, but not for the root Assets folder as it doesn't actually have a meta on it's own. I suspect that TortoiseSVN always displays the file if it is missing, which is what you're seeing. I'll add a special case for that.
     
  44. Daniel-F

    Daniel-F

    Joined:
    May 15, 2013
    Posts:
    26
    Just mentioning that the Assets.meta issue is affecting me also.
     
  45. NibbleByte3

    NibbleByte3

    Joined:
    Aug 9, 2017
    Posts:
    81
    Released version 1.4.3. Here are the changes:
    • Overlay icons now support "svn:ignore" and "svn:global-ignores" files. @HaMMMMer
    • Added Propget() operation support.
    • Don't include the .meta file in commit and revert context menu operations unless needed to. @Daniel-F, @HaMMMMer
    • Fixed issue "Icon does not refresh after Revert".
    Note that "svn:global-ignores" is read only once on startup to avoid refresh slow-down.
     
  46. HaMMMMer

    HaMMMMer

    Joined:
    Oct 25, 2021
    Posts:
    9
    Hi NibbleByte3,
    Thanks for your update, after download the new version everything wroks great except I am still in touble with the snv:global-Ignore overlay icons issue, my operations are:
    1. modify "Global ignore pattern" from TortoiseSvn setting, for example, I have a folder named Test that is unversioned, then I added Test and Test.meta in the the Global ignore.
    2.Restart unity, the Test folder overlay icon change to normal state(before added it to Global ignore It was blue question mark)

    I am not sure what do you mean the "startup", is that means restart unity?
    The "Scan for svn-ignores" and "Show Ignore & Excluded gray icon" are all enabled from the Preferences


     
  47. NibbleByte3

    NibbleByte3

    Joined:
    Aug 9, 2017
    Posts:
    81
    Hi,

    Let me clear up the terms so we are on the same page:
    • "svn:ignore" is a versioned property applied to the folder that filters out files and folders only in that immediate folder (not recursively). "Versioned" means the user needs to commit the property (the applied folder).
    • "svn:global-ignores" is similar, except it filters files and folders recursively.
    • TortoiseSVN allows to specify additional global ignore patterns in the settings. These patterns are NOT versioned (you don't commit them therefore are not shared with your team). They are applied on all repositories on the PC.
    Hint: all these options support wildcards, i.e. "MyFiles*.obj".

    Usually, when users want to ignore some file or folders they do "svn:ignore" via the TortoiseSVN context menu:
    upload_2022-4-13_21-12-22.png


    Doing that will add "svn:ignore" property locally to the parent folder like this:
    upload_2022-4-13_21-17-43.png

    Then you need to commit this change in order to share it with the rest of your team and never bother with it again.
    Just don't forget to add the .meta file the same way.

    To view the applied properties of a folder or file, right-click on it, "TortoiseSVN / Properties". I bet you have such properties in your project root folder.

    NOTE: All this is true for unversioned files! Versioned files cannot be ignored. If you have such, you need to unversion them first (by svn-deleting them).


    "svn:global-ignores" is similar, but used more rarely, as it is recursive. Usually people use it to exclude curtain file types in ALL sub-folders, e.g. *.blender, *obj. For WiseSVN this means that it has to dig in through all the files of the project which can be quite slow, so for now this happens only once on startup. To refresh it, you have to restart Unity, yes.


    As for TortoiseSVN settings global ignore pattern: I haven't added support for it as it is Windows and TortoiseSVN specific. I want to keep supporting Mac and other SVN clients (SnailSVN) with the least amount of effort.


    My advice to you is use "svn:ignore".
     
  48. HaMMMMer

    HaMMMMer

    Joined:
    Oct 25, 2021
    Posts:
    9
    Thanks for your detailed explaination, I am clear with it now!
     
  49. ysilog

    ysilog

    Joined:
    Dec 14, 2015
    Posts:
    9
    hello,
    Thanks, i like Wise SVN, and to be clear it seem it's the only maintained serious SVN integration on unity.

    i have a request for a Quality of Life feature:
    Can you add an "auto autolock" ?
    -> if the lock can be done without confirmation, it do it by itself without popup, potentially a notif to quick list files locked (on sceneview same than lock warning)
    -> if lock require extra attention and/or can't be done on all concerned files by itself, prompt with actual lock popup.
     
  50. NibbleByte3

    NibbleByte3

    Joined:
    Aug 9, 2017
    Posts:
    81
    This is how it originally worked, but I was worried that people would lock random files and bring chaos to your repo. :D
    I started working with Unreal, which has a very strong version control integration done the Perforce way, which looked ideal to me.

    It is true that prompting you to lock files could get annoying. Sure, I can add such option. The question is should this be personal or project wide option?
    - If it is a project wide preference, you apply this to the whole team. The benefit is that you can specify this rule to apply only for prefabs or only code, etc. Does this make sense? Is it worth it?
    - If it is a personal preference, it will be hidden in the preferences window and people wouldn't know about it. I can add a button "Auto-lock files if possible" in the prompt window. When pressed it will turn on this preference forever, until user disables it in the preference window.

    I think personal preference is the way here. What do you think?

    About displaying notification - I try to avoid drawing over editor windows and have any notifications, as they require more support with the Unity ever-changing API (I see in 2021 they have some new toolbar concept I need to research). And stuff drawn in the SceneView often conflicts with other tools :(
    But this will require some form of indication for the user.
    Maybe I can get away with the cheap EditorWindow.ShowNotification(). Would that be enough?

    PS: You're right, this SVN solution is maintained, because we are actually using it for a 180+ GB project :D