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

Wise SVN - Powerful TortoiseSVN / SnailSVN Integration

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

  1. ysilog

    ysilog

    Joined:
    Dec 14, 2015
    Posts:
    9
    I also work with Unreal, with SVN integration (perforce one is similar i guess)

    I think personnal preference with the "auto-lock if possible" checkable in prompt will be perfectly fine :)

    About displaying notification, i understand it seem complicated to have good notification system in unity editor, it seems that it is not intended ... it could be good if unity can add an internal editor's global notification or an api to send system notifications i guess.
    The issue with EditorWindow.ShowNotification() is it must pop in your own custom window if i understand well, so user must have an additionnal window/tab in interface only for this usage; it's not ideal but better than nothing.
     
  2. NibbleByte3

    NibbleByte3

    Joined:
    Aug 9, 2017
    Posts:
    77
    You are right, but there is a neat trick I've seen people do: I can call ShowNotification() on the EditorWindow.focusedWindow, i.e. the window the user is currently looking at (kind of) :D I also think that I can fetch the SceneView window somehow and display it there too.

    I'll do the changes soon.
     
  3. ysilog

    ysilog

    Joined:
    Dec 14, 2015
    Posts:
    9
    oh nice to know, thanks for the trick ;)
     
  4. NibbleByte3

    NibbleByte3

    Joined:
    Aug 9, 2017
    Posts:
    77
    Released version 1.4.4. Here are the changes:
    • Added Auto-locking preference (as requested @ysilog). It also displays notification in the focused window.
    • Fixed: menu items for Unity 2021 were not at the top (wrong priorities).
    • Fixed: migration prompt on Unity 2021.3 for experimental API usage.
    • Fixed: exception when ignore rules started with '#'(thanks to David David).
    • Fixed: changing assets in ignored or excluded folders displayed unversioned icon for a few seconds.
    Here is how the auto-locking looks @ysilog:
    upload_2022-5-7_10-42-9.png

    When auto-locking is enabled, it just displays a short notification in all your SceneViews and the currently focused window.
    upload_2022-5-7_10-40-20.png

    Cheers
     
  5. ysilog

    ysilog

    Joined:
    Dec 14, 2015
    Posts:
    9
    Nice, thanks.
     
  6. xodennisxo

    xodennisxo

    Joined:
    Mar 25, 2020
    Posts:
    16
    have you ever met this exception with WiseSVN in Unity2021.3.6?
    System.AggregateException: A Task's exception(s) were not observed either by Waiting on the Task or accessing its Exception property. As a result, the unobserved exception was rethrown by the finalizer thread. (Win32 IO returned 995. Path: C:\UnityProject\[Unknown]) ---> System.IO.IOException: Win32 IO returned 995. Path: C:\Test\UnityProject\[Unknown]
    at System.IO.FileStream.ReadData (System.Runtime.InteropServices.SafeHandle safeHandle, System.Byte[] buf, System.Int32 offset, System.Int32 count) [0x0002d] in <e40e5a8f982c4b618a930d29f9bd091c>:0
    at System.IO.FileStream.ReadInternal (System.Byte[] dest, System.Int32 offset, System.Int32 count) [0x00026] in <e40e5a8f982c4b618a930d29f9bd091c>:0
    at System.IO.FileStream.Read (System.Byte[] array, System.Int32 offset, System.Int32 count) [0x000a1] in <e40e5a8f982c4b618a930d29f9bd091c>:0
    at System.IO.Stream+<>c.<BeginReadInternal>b__40_0 (System.Object <p0>) [0x0000b] in <e40e5a8f982c4b618a930d29f9bd091c>:0
    at System.Threading.Tasks.Task`1[TResult].InnerInvoke () [0x0002b] in <e40e5a8f982c4b618a930d29f9bd091c>:0
    at System.Threading.Tasks.Task.Execute () [0x00000] in <e40e5a8f982c4b618a930d29f9bd091c>:0
    --- End of inner exception stack trace ---
    ---> (Inner Exception #0) System.IO.IOException: Win32 IO returned 995. Path: C:\Test\UnityProject\[Unknown]
    at System.IO.FileStream.ReadData (System.Runtime.InteropServices.SafeHandle safeHandle, System.Byte[] buf, System.Int32 offset, System.Int32 count) [0x0002d] in <e40e5a8f982c4b618a930d29f9bd091c>:0
    at System.IO.FileStream.ReadInternal (System.Byte[] dest, System.Int32 offset, System.Int32 count) [0x00026] in <e40e5a8f982c4b618a930d29f9bd091c>:0
    at System.IO.FileStream.Read (System.Byte[] array, System.Int32 offset, System.Int32 count) [0x000a1] in <e40e5a8f982c4b618a930d29f9bd091c>:0
    at System.IO.Stream+<>c.<BeginReadInternal>b__40_0 (System.Object <p0>) [0x0000b] in <e40e5a8f982c4b618a930d29f9bd091c>:0
    at System.Threading.Tasks.Task`1[TResult].InnerInvoke () [0x0002b] in <e40e5a8f982c4b618a930d29f9bd091c>:0
    at System.Threading.Tasks.Task.Execute () [0x00000] in <e40e5a8f982c4b618a930d29f9bd091c>:0 <---
     
  7. NibbleByte3

    NibbleByte3

    Joined:
    Aug 9, 2017
    Posts:
    77
    I tried running WiseSVN on 2021.3.6, nothing happens. Can you tell me how to reproduce this? When does it happen?

    Looking at the callstack it doesn't seem to be WiseSVN related. I've guarded all my file operations and threads with try-catch blocks so this can't happen. Also it mentions "Tasks" which I don't use.

    Do you have other plugins / packages in the project?

    Code (CSharp):
    1. System.IO.IOException: Win32 IO returned 995. Path: C:\Test\UnityProject\[Unknown]
    That is the only meaningful info I could read. Check if you have such folder, maybe something is locking it for read/write?

    995 definition is:
    The I/O operation has been aborted because of either a thread exit or
    an application request.
     
  8. Ca0zi

    Ca0zi

    Joined:
    Aug 8, 2022
    Posts:
    1
    Hello, I have same exception "System.IO.IOException: Win32 IO returned 995" in Unity2021.3.6, same like "ShellUtils.cs" excute command "svn status --depth=infinity -u "Assets@"" generate this exception. In my projecte, "svn status --depth=infinity -u "Assets@"" always spend more than 40s to excute, I try to change "Thread.Sleep(20)" to "Thread.Sleep(100)" in "ShellUtils.cs", the exception seems disappear. Or Move "CancelOutputRead" into "outputReadLineHandler" when read first null value can also reduce this exception frequency. I'm lack of relevant knowledge about process in C#, maybe you will find some solution.
     
  9. NibbleByte3

    NibbleByte3

    Joined:
    Aug 9, 2017
    Posts:
    77
    I've put a timeout for any svn operations in case they freeze forever (I've seen it happen). If you think timeout is the problem (will check later today), you may try to tweak these numbers in the WiseSVNIntegration.cs file:
    Code (CSharp):
    1.  
    2.         internal const int COMMAND_TIMEOUT = 20000;    // Milliseconds
    3.         internal const int ONLINE_COMMAND_TIMEOUT = 45000;  // Milliseconds
    4.  
    ONLINE_COMMAND_TIMEOUT is the timeout for operations that do server requests and by default is 45 seconds. If you have a very slow SVN server with lots of changes, this could happen I guess.
    COMMAND_TIMEOUT is for offline operations with your local repository - 20 seconds should be enough?
     
  10. NibbleByte3

    NibbleByte3

    Joined:
    Aug 9, 2017
    Posts:
    77
    I tried making ONLINE_COMMAND_TIMEOUT really small, but nothing happened. It may be related to CancelOutputRead() but I can't seem to reproduce it. I can't imagine why Thread.Sleep(100) works. Can you at least add a breakpoint in the ShellUtils.cs file at line
    Code (CSharp):
    1. result.Error += $"Command [{shellArgs.Command} {shellArgs.Args}] timed out.";
    and see if the debugger stops there?

    Can you tell me when this happens? On idle (WiseSVN tries to refresh overlay icons) or on some specific action? Why are requests to your repository so slow? Open "Right click / SVN / SVN Preferences / Personal tab" and set "Check for repository changes" to Disabled - does this fix the issue?

    Seems like your environment is somehow different than mine and I can't understand how.
     
  11. NibbleByte3

    NibbleByte3

    Joined:
    Aug 9, 2017
    Posts:
    77
    Released version 1.4.5. Here are the changes:
    • Added "Exclude" personal preference.
    • Personal preferences are now stored in the UserSettings folder. If none, check the old location - EditorPrefs. Added safeguard writing to files.
    • Fixed: Excludes did not work with filenames, only paths.
    • Nested repositories are now included in all relevant context menus: "Update All", "Commit All", "Revert All", "Changes All".
    • Fixed: modified overlay icons on parent folders for excluded entries.
    • Fixed: context Add command didn't work properly in "Packages" folder if package had capital letters.
     
  12. viatech

    viatech

    Joined:
    Dec 6, 2017
    Posts:
    55
    Hi

    Just added the latest version using the package manager from the GibHub URL. It installs OK but for some reason the project appears as part of the solution (sln) in Visual Studio. This is not how other packages behave so I wondered if there is any reason why.
     
  13. NibbleByte3

    NibbleByte3

    Joined:
    Aug 9, 2017
    Posts:
    77
    Not exactly sure, maybe try disabling the option "Preferences / External Tools / Git Packages"
    upload_2022-10-4_22-2-1.png

    Also, I wouldn't advise installing the package via github url. Sadly, this method requires the users (your team members) to have git installed on their machine, which is weird if your team is using SVN. I'm considering of hiding this option from the documentation. Better option would be using the openupm repository - merge this to your `Packages/manifest.json`
    Code (JavaScript):
    1. {
    2.     "scopedRegistries": [
    3.         {
    4.             "name": "package.openupm.com",
    5.             "url": "https://package.openupm.com",
    6.             "scopes": [
    7.                 "devlocker.versioncontrol.wisesvn"
    8.             ]
    9.         }
    10.     ],
    11.     "dependencies": {
    12.         "devlocker.versioncontrol.wisesvn": "1.4.5"
    13.     }
    14. }
     
    Last edited: Oct 4, 2022
  14. viatech

    viatech

    Joined:
    Dec 6, 2017
    Posts:
    55
    I had checked the external tools settings and the git option was unticked. I removed the package and used the scoped registry you suggested. That worked fine and the project file wasn't created. It was maybe a hang over from first adding the package via the asset store.
     
  15. NibbleByte3

    NibbleByte3

    Joined:
    Aug 9, 2017
    Posts:
    77
    Released version 1.4.6. Here are the changes:
    • Fixed: Overlay icons didn't refresh properly, if change occurred while updating database.
    • Added "Repo Browser" context menu.
    • Added "Check changes" & "Revert" icon next to each item in the lock prompt window.
    • Added "Silence!" button to suppress any auto-locking and lock prompts until restarted.
    • Lock prompt filter for script now includes asmdef & asmref.
    • Revert directly for single assets instead of opening TortoiseSVN.
    • Suppress false positive error on baking a scene.
    • SVNStatusData now includes MovedTo and MovedFrom data.
     
    Lars-Steenhoff likes this.
  16. Lars-Steenhoff

    Lars-Steenhoff

    Joined:
    Aug 7, 2007
    Posts:
    3,449
    I'm having a warning when trying to add a file via svn in unity.
    Any Idea how I could resolve this?
     

    Attached Files:

  17. NibbleByte3

    NibbleByte3

    Joined:
    Aug 9, 2017
    Posts:
    77
    Are you trying to add files/folder that are already versioned? I'm not sure how SnailSVN reacts to this. Can you add the same files/folder from Finder, outside Unity? The path of the message is strange - points to the root of your project, not actual asset. Does this happen with single or multi-selection of asssets?

    I don't have access to Mac at the moment so I can't check easily. When you use "SVN / Add" it basically runs this:
    Code (boo):
    1. /Applications/SnailSVN.app/Contents/Resources/snailsvn.sh add "Assets/MyModel.fbx" "Assets/MyModel.fbx.meta"
    Can you run it in the terminal with the same files/folder?
     
  18. Lars-Steenhoff

    Lars-Steenhoff

    Joined:
    Aug 7, 2007
    Posts:
    3,449
    The file itself was just created in unity so not under version control, but the folder the file is created in is under version control. but the strange thing is when I run the command in command line a window pops up with the root of the project but also an error:

    /Applications/SnailSVN.app/Contents/Resources/snailsvn.sh: line 81: python: command not found
     
  19. NibbleByte3

    NibbleByte3

    Joined:
    Aug 9, 2017
    Posts:
    77
    I can't check it without access to Mac. :(
    Can you please send me zip of the "Resources" folder to my mail: nibblebyte3@gmail.com
    I can try and figure out what's going on by reading the scripts.

    This used to work, maybe SnailSVN got updated and something changed.
     
  20. Lars-Steenhoff

    Lars-Steenhoff

    Joined:
    Aug 7, 2007
    Posts:
    3,449
    Thank you, I send the email.
    By the way there is a way to use MacOS in a virtual machine, without needing a real mac. but that may be out of scope for this project.
     
  21. NibbleByte3

    NibbleByte3

    Joined:
    Aug 9, 2017
    Posts:
    77
    Ok, I think I've found the problem. The error happens on this line of the snailsvn.sh:
    Code (Boo):
    1. encodedPaths+=$(python -c "import urllib; print urllib.quote('''${current_dir}/${file}''')")
    Checking out this command I found this: https://stackoverflow.com/a/31827113
    Python 2 has "urllib.quote", but in Python 3 this was changed to: "urllib.parse.quote". Your SnailSVN probably runs Python 3 or newer.
    I'm not sure if SnailSVN brings it's own Python or uses the one that comes with the system. In any case, SnailSVN needs to update their API.
    While this happens, you can try modifying snailsvn.sh to use the new API:
    Code (Boo):
    1. encodedPaths+=$(python -c "import urllib; print urllib.parse.quote('''${current_dir}/${file}''')")
    !!!Do this for Line 79 above as well!


    Let me know if that fixes the issue. If it does, I'll write the SnailSVN developer to fix it.
    Also can you tell me what version of Python you have installed? Quick tip on checking python version from google:
     
    Last edited: Apr 17, 2023
  22. Lars-Steenhoff

    Lars-Steenhoff

    Joined:
    Aug 7, 2007
    Posts:
    3,449
    I'm using python 3.9.6 I also tried installing the latest from python website.
    I also changed the urllib.parse.quote

    But there is another type of problem
    It seems to look for an .exe file ? as can be seen on the screenshot.

    The svn Path seems to work for Snail SVN app in preferences of that app so its strange that unity does not see it.
    Screenshot 2023-04-18 at 15.32.21.png Screenshot 2023-04-18 at 15.32.41.png

    MacOS does not include SVN command line anymore so I installed it manually
     
  23. NibbleByte3

    NibbleByte3

    Joined:
    Aug 9, 2017
    Posts:
    77
    It is looking for the svn executable binary. I see that you put "/opt/local/bin" in the WiseSVN preferences, but that is just a folder. You need to specify the full path of the binary - in your case "/opt/local/bin/svn" probably.

    WiseSVN tries to find the svn installation in the "usual" places so you don't have to do it manually (only if svn command is not in your PATH environment variable). Sadly it didn't look in that folder "/opt/local/bin". Will add it to the list.

    I take it that the urllib.parse.quote fix works. Will write to Snail SVN author.
     
  24. Lars-Steenhoff

    Lars-Steenhoff

    Joined:
    Aug 7, 2007
    Posts:
    3,449
    There is also an svn embedded in snailsvn, you could probably also look for that one ?

    I'm still trying to get it to work by the way, even with full path.

    Screenshot 2023-04-18 at 20.25.39.png Screenshot 2023-04-18 at 20.24.05.png

    Maybe I need to try another version of svn CLI
     
  25. NibbleByte3

    NibbleByte3

    Joined:
    Aug 9, 2017
    Posts:
    77
    That is a great idea! You may try using bundled up versions yourself. Just set the SVN CLI Path to "/Applications/SnailSVN.app/Contents/PlugIns/SnailSVNExtension.appex/Contents/XPCServices/SnailSVNCache.xpc/Contents/Resources/subversion/x86_64/1.11.x/svn" or any other version. Let me know if you manage to figure it out.

    You can test if the svn binaries work by typing this command in the terminal:
    /opt/local/bin/svn info "path-to-your-svn-project"
    Should display info about your project.
     
    Lars-Steenhoff likes this.
  26. Lars-Steenhoff

    Lars-Steenhoff

    Joined:
    Aug 7, 2007
    Posts:
    3,449
    I added the svn path inside SnailSVN and it is reconised,

    And for the example Check all changes works

    just some things are still strange. for example I cannot delete a file inside unity.

    /opt/local/bin/svn info "path-to-your-svn-project" this gives me status info yes.

    I will send you a video showing what's happening.
    Thanks for adding the changes to the asset.
     
    Last edited: Apr 18, 2023
  27. NibbleByte3

    NibbleByte3

    Joined:
    Aug 9, 2017
    Posts:
    77
    Released version v1.4.7. Notable changes:
    • Adding support for SnailSVN premium/payed version.
    • Improved OSX support (better error handling & initial setup)
    • Fixed error on trying to delete unversioned meta file.
    • Ignore folder paths ('/' & '' slashes) for svn ignore properties as those are not supported by SVN.
    Additionally, talked with the SnailSVN developers about their python issue and they said that they will fix it soon.
     
    Lars-Steenhoff likes this.
  28. NibbleByte3

    NibbleByte3

    Joined:
    Aug 9, 2017
    Posts:
    77
    Released version v.1.5.0. Notable changes:
    • Add RabbitSVN context menu support for Linux! Thanks to EmiyaSyahriel (https://github.com/EmiyaSyahriel)
    • Adding authentication checks. If authentication is needed a special button is displayed in the preferences window to help user log in. Works with nested repositories.
    • Adding Revert confirmation message for single files.
    • MacOS support fixes and improvements.
    • Improved API
    • Added generic CLI context menu support (editor window to run svn commands). Can be used on Windows, Linux, MacOS.
     
    Lars-Steenhoff likes this.
  29. Lars-Steenhoff

    Lars-Steenhoff

    Joined:
    Aug 7, 2007
    Posts:
    3,449
    Thanks for the fixes for MacOS!
     
  30. CaseyHofland

    CaseyHofland

    Joined:
    Mar 18, 2016
    Posts:
    548
    So after last project, I have a lot of reasons of my own, but I'm gonna leave this as an open question:

    If I'm an indie team of programmers, artists, audio creators and designers, why should I choose SVN over Git?
     
  31. NibbleByte3

    NibbleByte3

    Joined:
    Aug 9, 2017
    Posts:
    77
    You're about to start a war here. :D

    Ok, here's my take on this:
    • We believe (my studio) that SVN is more user friendly for non-tech personnel (artists, designers). We are 60+ people, out of which 17 are programmers.
      • We tried Perforce. It didn't work out. To me this system is absurd and much more complicated. Also - expensive. File locking workflow can be achieved in SVN as well (with WiseSVN).
    • If your team does mainly trunk development style (i.e. commit everything in the master, no branches), SVN seems a perfect fit for this. This makes the process for lone developers or small teams simpler.
      • Working in branches is generally avoided in game dev, as assets merge is hard (even with prefabs).
    • SVN doesn't handle well branches, especially long standing ones. Most issues happen on move/renaming files in branch, merging back to the trunk, then syncing back to the branch. At some point svn confuses the move/renames it already did with new ones and tree-conflicts happen.
      • This is especially painful after release, where the trunk needs to be kept stable and we start working in feature branches.
    • With git you get a "personal" branch out of the box when you can commit stuff all you want before pushing to the master. Some people love this, as they don't need to keep a lot of local changes pending that get in the way. This has a drawback - you can gather a lot of local commits before pushing into the master which can cause conflicts.
      • Since svn doesn't have this, people just commit in the trunk regularly or do separate branch.
      • Git allows you to undo previous commits and change the history in some ways. SVN doesn't allow this - if you commit it - it's there forever. Undo for a commit is just another commit with inverted changes.
      • SVN supports shelving, but it's kind of half-baked so we don't really use it :(
    • SVN revisions are simple incrementing number. Git revision "numbers" are long strings like this "2db094fe255b17a9e471e956ca9d4ec187f63686" or short version "2db094f" which is not very human friendly. Often QAs ask "When was this fixed?" and we tell them "in 560 revision". They can quickly calculate that the build they are testing of revision 557 does not have the fix.
    • The TortoiseSVN client is much more evolved than the TortoiseGit. But you probably will be using other better clients.
    • Last time I checked, there isn't a good git integration for Unity.
      • A lot of people don't use integration with Unity. This is fine, but renaming files won't be properly synced with git (or svn), loosing the file history. Git does "move/rename" operation automatically if file was moved, but not if it was moved and modified. Consider this: renaming a ScriptableObject will change the "m_Name" field modifying the file as well - history of the file will be lost. Renaming MonoBehaviour script will need to change the class name inside - same result. Script renaming done in your IDE can make the link, but will it move the .meta file correctly? Last time I checked - no.
      • A lot of programmers use commands in the terminal to do git operations. This is fine, just don't make artists do it.
    • Git used to not handle well large files, which are typical for game dev. You can do it now with large files support (LFS), but this requires a bit more setup. svn on the other side doesn't care about large files.
    • SVN doesn't allow partial history erase. If you committed a large files, then deleted them, they remain forever in the repository history and contribute to it's size. The only way to deal with this is erase the whole history up till the deletion revision.
      • Perforce supports partial history erase. Not sure about git.
    • As for the DevOps side - can't tell you much which is easier to support.

    So basically:
    • If you plan to work mainly in branches - use git.
    • If you have more artists & designers - svn is easier to use (especially with WiseSVN ;) ).
    • If you are 3-5 people team - just use what you already know. It doesn't matter that much :)
    Personally, I have Unity projects in github that I have checked out using the github svn emulation API and work with svn. :D It has some issues, but works fine for me.

    In Bulgaria, where I live, most large studios use SVN (Gameloft, Haemimont, Snapshot Games, Masthead) or Perforce (Ubisoft, Creative Assembly). This excludes casino game companies. Haven't heard anyone using git for gamedev. I suspect it is mostly used by small teams that are programmer-based.

    I have a UI designer in my team and she said that at her last job they used git. They were making browser games. They made her use git commands in the terminal. It was very stressful for her. Her new workflow at the moment is: do everything inside Unity, commit and update with WiseSVN (that calls TortoiseSVN) and that's it.

    Note: I have very little experience with git.
     
    Last edited: Jun 18, 2023
  32. CaseyHofland

    CaseyHofland

    Joined:
    Mar 18, 2016
    Posts:
    548
    Thank you for that excellent explanation! My gripe lies in that painful area of “artists ruining the git but can you blame em?”

    I was also send this amazing thread about why version control for gamedev is a serious issue, which expertly breaks down the different needs of artists and developers while being funny as S***.

    As it all starts flattening out, I’m leaning more and more to a hybrid approach of using SVN for the Unity Project while hosting code packages where versioning really matters on git.

    I’m separately hosting code packages anyway so that would integrate really nicely (btw, separately hosting code packages is THE BEST and I can highly recommend it for any workflow).

    Regardless: Unity should be a playground for the creatives, and right now it’s not. Code on the other hand is more concerned with long-term problem solving at scale, and it operates nicely from gray boxes as is. Mark my words, if a best of both worlds exists I’ll find it.
     
    NibbleByte3 likes this.
  33. NibbleByte3

    NibbleByte3

    Joined:
    Aug 9, 2017
    Posts:
    77
    Keep in mind that if you refer packages using github urls in the manifest.json, artists would still need git installed. If you use some scope registry like OpenUPM, you won't need git installed.

    By the way, when I do packages, the master branch is the Unity project I develop on. I do an #upm branch that is a copy of the package folder from the master branch. I used THIS guide as setup. Basically I run:
    And it produces this nice upm branch ready to be added in the manifest.json:
    Wanted to add: our artists use google drive to store and exchange their source assets (Blender, Zbrush, etc files that are too big to go into source control and we don't care about history).
    Also, we have a policy for our artists to import their output in the engine themselves and view them in Unity before committing. Doesn't always work, but it is a nice policy.
     
    Last edited: Jun 18, 2023
    CaseyHofland likes this.
  34. CaseyHofland

    CaseyHofland

    Joined:
    Mar 18, 2016
    Posts:
    548
    I know of it, but I prefer submodules.

    I have a github of the unity package and then when I start a new project in which I may want to further develop that package I import it as a submodule. It's really lean to be able to work on 1 unity package from multiple projects with different needs.

    Thanks, I knew they needed to install git, but I didn't know OpenUPM doesn't have that issue! That will be very important when I want to make my packages more openly accessible!
     
    NibbleByte3 likes this.
  35. FromTheFuture

    FromTheFuture

    Joined:
    Jul 25, 2012
    Posts:
    46
    Hello - in a somewhat related subject, I use SVN externals heavily to reference internal core code between Unity projects. This isn't an error - but in the Project view, WiseSVN shows a modified "!" on any folder that has an SVN external reference in it or any subfolder.

    Is there anything I can do to clear/ignore this so that it doesn't always appear as if there's a modification when there really isn't?

    Thanks!
     
  36. NibbleByte3

    NibbleByte3

    Joined:
    Aug 9, 2017
    Posts:
    77
    SVN externals support should be transparent for the user - if no changes in the externals are present, no overlay icons should be displayed. Do you want to ignore changes in the external folders? You can do this by adding them in the "Exclude" list in the WiseSVN preferences (either in Personal or Project tab).

    NOTE: if you have a modified "!" icon over the folder itself (not the files in it), you may have change in the folder's meta - revert it and the icon should disappear.
     
  37. FromTheFuture

    FromTheFuture

    Joined:
    Jul 25, 2012
    Posts:
    46
    Hello,

    I don't want to exclude the externals folder - I often make changes/fixes here that I want checked in.

    There are no modifications to those folders - TortoiseSVN and (WiseSVN in Unity when I choose Diff, Check Changes, Revert, etc) all show no modifications. The externals property is set on the folder, but that's been committed. But 100% of the time, any folder in any of my Unity projects that has SVN externals specified (including having a subfolder that has externals) will show the modified icon over the folder. (Happens on all other PCs, too - it isn't just something with this one.)

    Not a big issue, but means I just mostly stop paying attention to the icons.

    Thanks for your time!
     
  38. NibbleByte3

    NibbleByte3

    Joined:
    Aug 9, 2017
    Posts:
    77
    That sounds strange. If the external property isn't committed it should be displayed as modification "!" of that folder. But you say it is committed, so it shouldn't be displayed. So this sounds like a bug. Can you open cmd in that folder and type in: "svn status -u" and give me the result?

    Also, what version of WiseSVN are you using? I have a vague memory of fixing similar issue long time ago. You can check it in the WiseSVN Preferences, the About tab. If that isn't visible check the "package.json" in the plugin folder. Try getting the latest version.
     
    Last edited: Sep 9, 2023
  39. FromTheFuture

    FromTheFuture

    Joined:
    Jul 25, 2012
    Posts:
    46
    Hello,
    Sure - I just picked one, but trying in all of them, they give similar results:
    Code (CSharp):
    1.     X        47062   FTFSkybox.meta
    2. X                    FTFSkybox
    3. Status against revision:  47078
    4.  
    5. Performing status on external item at 'FTFSkybox':
    6. Status against revision:  47078
    And I am using the latest: Version: WiseSVN 1.5.0
     
  40. NibbleByte3

    NibbleByte3

    Joined:
    Aug 9, 2017
    Posts:
    77
    I see the bug. Happens only when having 2 or more levels deep of externals. Will fix it tomorrow (probably).
     
    FromTheFuture and Lars-Steenhoff like this.
  41. NibbleByte3

    NibbleByte3

    Joined:
    Aug 9, 2017
    Posts:
    77
    Fixed the bug. You can apply the fix yourself by checking out my commit HERE. Or you can wait for the official release that will happen most probably by the end of the next week.
    @FromTheFuture
     
    FromTheFuture and Lars-Steenhoff like this.
  42. FromTheFuture

    FromTheFuture

    Joined:
    Jul 25, 2012
    Posts:
    46
    That worked perfectly! Spectacular, thank you so much for your time, and for this wonderful plugin. It is very much appreciated!

    Cheers!
     
  43. NibbleByte3

    NibbleByte3

    Joined:
    Aug 9, 2017
    Posts:
    77
    Released version v1.5.1. Notable changes:
    • Adding unicode icons to the context menu.
    • Ask for confirmation when moving/renaming versioned folder (can be turned off from the personal preferences).
    • Fixed error on fetching lock details, when target file is missing.
    • Fixed: status database logging "UnknownError" on time out. Time out is now recognized correctly.
    • Fixed: recursive externals displayed false modified "!" overlay icon.
    • Adding "Progress Bar" when manually refreshing SVN icons.
    upload_2023-10-4_22-10-0.png
     
    Last edited: Oct 4, 2023
    FromTheFuture and Lars-Steenhoff like this.
  44. Lars-Steenhoff

    Lars-Steenhoff

    Joined:
    Aug 7, 2007
    Posts:
    3,449
    Really nice update!
     
  45. DesignaAct

    DesignaAct

    Joined:
    Mar 7, 2018
    Posts:
    1
    I'm using a translation tool.
    Thank you for the wonderful tool.

    When copying a scene file managed by SVN on Unity2022.3.12f1 + WiseSVN1.5.1 using AssetDataBase.CopyAssets
    It seems that the copy destination metafile is deleted on SVN regardless of whether the copy destination file exists or not.

    I have temporarily replaced it with FileUtil, but is there something wrong with the specification?
     
  46. NibbleByte3

    NibbleByte3

    Joined:
    Aug 9, 2017
    Posts:
    77
    Yes, this seems like a bug, but I'm not sure how to solve it.

    WiseSVN hooks to the AssetModificationProcessor callbacks and runs appropriate svn commands.
    When I call AssetDatabase.CopyAsset() with existing asset for destination path, it replaces it automatically.
    This triggers these callbacks in the following order for the destination asset:
    • AssetModificationProcessor.OnWillCreateAsset()
    • AssetModificationProcessor.OnWillDeleteAsset()
    The delete callback gets called last, tricking svn to mark the asset as deleted. Sadly, there is no callback "after created asset" :( There is no easy way of knowing if this was normal delete of an asset, or an overwrite from a copy. I may hack this in the future, but for now - no fix. :(

    Here is a work around - temporarily disable WiseSVN with the exposed API:
    Code (CSharp):
    1.     try {
    2.         WiseSVNIntegration.RequestTemporaryDisable();
    3.  
    4.         AssetDatabase.CopyAsset(path, destinationPath);
    5.  
    6.     } finally {
    7.         WiseSVNIntegration.ClearTemporaryDisable();
    8.     }
    Or you can just use standard file operations that bypass WiseSVN hooks (as you already have found out).