kjems / uversioncontrol

Version Control for Unity using SVN
https://www.assetstore.unity3d.com/en/#!/content/3350
52 stars 13 forks source link

Exceptions in Unity 2018 after renaming files outside of Unity #4

Open olivier4321 opened 5 years ago

olivier4321 commented 5 years ago

I created a new project with Unity 2018.2.16f1 and installed the latest git version of UVC. I also have TortoiseSVN 1.11.0 installed, on Windows 10.

If I select an asset in the project and press F2 to rename it from "SampleScene" to "SampleScene2", then press return, I get this exception:

Title: UVC Exception

Message: svn: E200007: Cannot move path 'C:\Users\olivier\Documents\Tests-UVC\checkout\trunk\NewUnityProject\Assets\Scenes\SampleScene2.unity' into itself

Details: C:/Users/olivier/Documents/Tests-UVC/checkout/trunk/NewUnityProject svn --non-interactive move "Assets/Scenes/SampleScene2.unity" "Assets/Scenes/SampleScene2.unity"

CommandLineExecution.CommandLineOutput ExecuteOperation(CommandLineExecution.CommandLine, Boolean) C:\Users\olivier\Documents\Tests-UVC\checkout\trunk\New Unity Project\Packages\uversioncontrol-master\UVC.SVNBackend\SVNCommands.cs : 392 Boolean CreateOperation(System.String, Boolean) C:\Users\olivier\Documents\Tests-UVC\checkout\trunk\New Unity Project\Packages\uversioncontrol-master\UVC.SVNBackend\SVNCommands.cs : 321 Boolean Move(System.String, System.String) C:\Users\olivier\Documents\Tests-UVC\checkout\trunk\New Unity Project\Packages\uversioncontrol-master\UVC.SVNBackend\SVNCommands.cs : 589 Boolean Move(System.String, System.String) C:\Users\olivier\Documents\Tests-UVC\checkout\trunk\New Unity Project\Packages\uversioncontrol-master\UVC.Common\VCCDecorator.cs : 170 Boolean Move(System.String, System.String) C:\Users\olivier\Documents\Tests-UVC\checkout\trunk\New Unity Project\Packages\uversioncontrol-master\UVC.UnityVersionControl\API\VCCAddMetaFiles.cs : 71 Boolean Move(System.String, System.String) C:\Users\olivier\Documents\Tests-UVC\checkout\trunk\New Unity Project\Packages\uversioncontrol-master\UVC.Common\VCCDecorator.cs : 170 Boolean Move(System.String, System.String) C:\Users\olivier\Documents\Tests-UVC\checkout\trunk\New Unity Project\Packages\uversioncontrol-master\UVC.VCCDecorators\VCCFilteredAssets.cs : 136 Boolean <>m__0() C:\Users\olivier\Documents\Tests-UVC\checkout\trunk\New Unity Project\Packages\uversioncontrol-master\UVC.UnityVersionControl\API\VCCommands.cs : 593 Boolean HandleExceptionsBoolean C:\Users\olivier\Documents\Tests-UVC\checkout\trunk\New Unity Project\Packages\uversioncontrol-master\UVC.UnityVersionControl\API\VCCommands.cs : 173 Boolean Move(System.String, System.String) C:\Users\olivier\Documents\Tests-UVC\checkout\trunk\New Unity Project\Packages\uversioncontrol-master\UVC.UnityVersionControl\API\VCCommands.cs : 588 Void ReMoveAssetOnVC(System.String, System.String) C:\Users\olivier\Documents\Tests-UVC\checkout\trunk\New Unity Project\Packages\uversioncontrol-master\UVC.UnityVersionControl\UnityHooks\VCRefreshOnNewAsset.cs : 144 Void OnPostprocessAllAssets(System.String[], System.String[], System.String[], System.String[]) C:\Users\olivier\Documents\Tests-UVC\checkout\trunk\New Unity Project\Packages\uversioncontrol-master\UVC.UnityVersionControl\UnityHooks\VCRefreshOnNewAsset.cs : 39 System.Object InternalInvoke() : 0 System.Object Invoke(System.Object, System.Reflection.BindingFlags, System.Reflection.Binder, System.Object[], System.Globalization.CultureInfo) : 0 System.Object Invoke(System.Object, System.Object[]) : 0 Void PostprocessAllAssets(System.String[], System.String[], System.String[], System.String[], System.String[]) C:\buildslave\unity\build\Editor\Mono\AssetPostprocessor.cs : 140 Void SetNameSmartWithInstanceID() : 0 Void RenameEnded() C:\buildslave\unity\build\Editor\Mono\ObjectListArea.cs : 745 Void HandleRenameOverlay() C:\buildslave\unity\build\Editor\Mono\ObjectListArea.cs : 775 Void DrawItem(UnityEngine.Rect, FilterResult, UnityEditor.BuiltinResource, Boolean) C:\buildslave\unity\build\Editor\Mono\ObjectListLocalGroup.cs : 851 Void DrawInternal(Int32, Int32, Single) C:\buildslave\unity\build\Editor\Mono\ObjectListLocalGroup.cs : 203 Void Draw(Single, UnityEngine.Vector2, Int32 ByRef) C:\buildslave\unity\build\Editor\Mono\ObjectListGroup.cs : 154 Void HandleListArea() C:\buildslave\unity\build\Editor\Mono\ObjectListArea.cs : 1354 Void OnGUI(UnityEngine.Rect, Int32) C:\buildslave\unity\build\Editor\Mono\ObjectListArea.cs : 565 Void OnGUI() C:\buildslave\unity\build\Editor\Mono\ProjectBrowser.cs : 2000 System.Object InternalInvoke() : 0 System.Object Invoke(System.Object, System.Reflection.BindingFlags, System.Reflection.Binder, System.Object[], System.Globalization.CultureInfo) : 0 System.Object Invoke(System.Object, System.Object[]) : 0 Void Invoke(System.String, System.Object) C:\buildslave\unity\build\Editor\Mono\HostView.cs : 295 Void Invoke(System.String) C:\buildslave\unity\build\Editor\Mono\HostView.cs : 288 Void InvokeOnGUI(UnityEngine.Rect) C:\buildslave\unity\build\Editor\Mono\HostView.cs : 255 Void OldOnGUI() C:\buildslave\unity\build\Editor\Mono\GUI\DockArea.cs : 392 Void DoOnGUI(UnityEngine.Event, Boolean) C:\buildslave\unity\build\Modules\UIElements\IMGUIContainer.cs : 216 Boolean HandleIMGUIEvent(UnityEngine.Event) C:\buildslave\unity\build\Modules\UIElements\IMGUIContainer.cs : 376 Void DispatchEvent(UnityEngine.Experimental.UIElements.EventBase, UnityEngine.Experimental.UIElements.IPanel) C:\buildslave\unity\build\Modules\UIElements\EventDispatcher.cs : 290 Boolean DoDispatch(UnityEngine.Experimental.UIElements.BaseVisualElementPanel) C:\buildslave\unity\build\Modules\UIElements\UIElementsUtility.cs : 243 Boolean ProcessEvent(Int32, IntPtr) C:\buildslave\unity\build\Modules\UIElements\UIElementsUtility.cs : 74 Boolean ProcessEvent(Int32, IntPtr) C:\buildslave\unity\build\Modules\IMGUI\GUIUtility.cs : 171

Stacktrace: at UVC.Backend.SVN.SVNCommands.ExecuteOperation (CommandLineExecution.CommandLine commandLine, System.Boolean useOperationLock) [0x0025c] in C:\Users\olivier\Documents\Tests-UVC\checkout\trunk\New Unity Project\Packages\uversioncontrol-master\UVC.SVNBackend\SVNCommands.cs:392 at UVC.Backend.SVN.SVNCommands.CreateOperation (System.String arguments, System.Boolean onlyRunWhenActive) [0x0004b] in C:\Users\olivier\Documents\Tests-UVC\checkout\trunk\New Unity Project\Packages\uversioncontrol-master\UVC.SVNBackend\SVNCommands.cs:321 at UVC.Backend.SVN.SVNCommands.Move (System.String from, System.String to) [0x0003e] in C:\Users\olivier\Documents\Tests-UVC\checkout\trunk\New Unity Project\Packages\uversioncontrol-master\UVC.SVNBackend\SVNCommands.cs:589 at UVC.VCCDecorator.Move (System.String from, System.String to) [0x00009] in C:\Users\olivier\Documents\Tests-UVC\checkout\trunk\New Unity Project\Packages\uversioncontrol-master\UVC.Common\VCCDecorator.cs:170 at UVC.VCCAddMetaFiles.Move (System.String from, System.String to) [0x00004] in C:\Users\olivier\Documents\Tests-UVC\checkout\trunk\New Unity Project\Packages\uversioncontrol-master\UVC.UnityVersionControl\API\VCCAddMetaFiles.cs:71 at UVC.VCCDecorator.Move (System.String from, System.String to) [0x00009] in C:\Users\olivier\Documents\Tests-UVC\checkout\trunk\New Unity Project\Packages\uversioncontrol-master\UVC.Common\VCCDecorator.cs:170 at UVC.VCCFilteredAssets.Move (System.String from, System.String to) [0x0003a] in C:\Users\olivier\Documents\Tests-UVC\checkout\trunk\New Unity Project\Packages\uversioncontrol-master\UVC.VCCDecorators\VCCFilteredAssets.cs:136 at UVC.VCCommands+cAnonStorey16.<>m0 () [0x0004b] in C:\Users\olivier\Documents\Tests-UVC\checkout\trunk\New Unity Project\Packages\uversioncontrol-master\UVC.UnityVersionControl\API\VCCommands.cs:593 at UVC.VCCommands.HandleExceptions[T] (System.Func`1[TResult] func) [0x00022] in C:\Users\olivier\Documents\Tests-UVC\checkout\trunk\New Unity Project\Packages\uversioncontrol-master\UVC.UnityVersionControl\API\VCCommands.cs:173

Before that exception are two warnings:

Timestamps (402) and assets (403) maps out of sync - repairing... UnityEditor.AssetDatabase:Refresh() UVC.RefreshOnNewAsset:MoveAssetBack(String, String) (at C:/Users/ofabre/Documents/Tests-UVC/checkout/trunk/New Unity Project/Packages/uversioncontrol-master/UVC.UnityVersionControl/UnityHooks/VCRefreshOnNewAsset.cs:167) UVC.RefreshOnNewAsset:ReMoveAssetOnVC(String, String) (at C:/Users/ofabre/Documents/Tests-UVC/checkout/trunk/New Unity Project/Packages/uversioncontrol-master/UVC.UnityVersionControl/UnityHooks/VCRefreshOnNewAsset.cs:141) UVC.RefreshOnNewAsset:OnPostprocessAllAssets(String[], String[], String[], String[]) (at C:/Users/ofabre/Documents/Tests-UVC/checkout/trunk/New Unity Project/Packages/uversioncontrol-master/UVC.UnityVersionControl/UnityHooks/VCRefreshOnNewAsset.cs:39) UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)

The AssetDatabase contains an asset with GUID 'Assets/Scenes/SampleScene.unity', but no timestamp. This asset will be removed from the database. UnityEditor.AssetDatabase:Refresh() UVC.RefreshOnNewAsset:MoveAssetBack(String, String) (at C:/Users/ofabre/Documents/Tests-UVC/checkout/trunk/New Unity Project/Packages/uversioncontrol-master/UVC.UnityVersionControl/UnityHooks/VCRefreshOnNewAsset.cs:167) UVC.RefreshOnNewAsset:ReMoveAssetOnVC(String, String) (at C:/Users/ofabre/Documents/Tests-UVC/checkout/trunk/New Unity Project/Packages/uversioncontrol-master/UVC.UnityVersionControl/UnityHooks/VCRefreshOnNewAsset.cs:141) UVC.RefreshOnNewAsset:OnPostprocessAllAssets(String[], String[], String[], String[]) (at C:/Users/ofabre/Documents/Tests-UVC/checkout/trunk/New Unity Project/Packages/uversioncontrol-master/UVC.UnityVersionControl/UnityHooks/VCRefreshOnNewAsset.cs:39) UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)

olivier4321 commented 5 years ago

The problem may have been caused because I had to rename the Unity project from "New Unity Project" to "NewUnityProject" using TortoiseSVN, because of bug #3.

olivier4321 commented 5 years ago

I got the same exception (and more) by doing the following:

Here are the warnings and errors that showed in the console:

Timestamps (402) and assets (403) maps out of sync - repairing... UnityEditor.AssetDatabase:Refresh() UVC.RefreshOnNewAsset:MoveAssetBack(String, String) (at C:/Users/olivier/Documents/Tests-UVC/checkout/trunk/New Unity Project/Packages/uversioncontrol-master/UVC.UnityVersionControl/UnityHooks/VCRefreshOnNewAsset.cs:167) UVC.RefreshOnNewAsset:ReMoveAssetOnVC(String, String) (at C:/Users/olivier/Documents/Tests-UVC/checkout/trunk/New Unity Project/Packages/uversioncontrol-master/UVC.UnityVersionControl/UnityHooks/VCRefreshOnNewAsset.cs:141) UVC.RefreshOnNewAsset:OnPostprocessAllAssets(String[], String[], String[], String[]) (at C:/Users/olivier/Documents/Tests-UVC/checkout/trunk/New Unity Project/Packages/uversioncontrol-master/UVC.UnityVersionControl/UnityHooks/VCRefreshOnNewAsset.cs:39)

The AssetDatabase contains an asset with GUID 'Assets/Scenes/SampleScene2.unity', but no timestamp. This asset will be removed from the database. UnityEditor.AssetDatabase:Refresh() UVC.RefreshOnNewAsset:MoveAssetBack(String, String) (at C:/Users/olivier/Documents/Tests-UVC/checkout/trunk/New Unity Project/Packages/uversioncontrol-master/UVC.UnityVersionControl/UnityHooks/VCRefreshOnNewAsset.cs:167) UVC.RefreshOnNewAsset:ReMoveAssetOnVC(String, String) (at C:/Users/olivier/Documents/Tests-UVC/checkout/trunk/New Unity Project/Packages/uversioncontrol-master/UVC.UnityVersionControl/UnityHooks/VCRefreshOnNewAsset.cs:141) UVC.RefreshOnNewAsset:OnPostprocessAllAssets(String[], String[], String[], String[]) (at C:/Users/olivier/Documents/Tests-UVC/checkout/trunk/New Unity Project/Packages/uversioncontrol-master/UVC.UnityVersionControl/UnityHooks/VCRefreshOnNewAsset.cs:39) UnityEditor.AssetPostprocessingInternal:PostprocessAllAssets(String[], String[], String[], String[], String[])

Timestamps (402) and assets (403) maps out of sync - repairing... UnityEditor.AssetDatabase:Refresh() UVC.RefreshOnNewAsset:MoveAssetBack(String, String) (at C:/Users/olivier/Documents/Tests-UVC/checkout/trunk/New Unity Project/Packages/uversioncontrol-master/UVC.UnityVersionControl/UnityHooks/VCRefreshOnNewAsset.cs:167) UVC.RefreshOnNewAsset:ReMoveAssetOnVC(String, String) (at C:/Users/olivier/Documents/Tests-UVC/checkout/trunk/New Unity Project/Packages/uversioncontrol-master/UVC.UnityVersionControl/UnityHooks/VCRefreshOnNewAsset.cs:141) UVC.RefreshOnNewAsset:OnPostprocessAllAssets(String[], String[], String[], String[]) (at C:/Users/olivier/Documents/Tests-UVC/checkout/trunk/New Unity Project/Packages/uversioncontrol-master/UVC.UnityVersionControl/UnityHooks/VCRefreshOnNewAsset.cs:39) UnityEditor.AssetPostprocessingInternal:PostprocessAllAssets(String[], String[], String[], String[], String[])

The AssetDatabase contains an asset with GUID 'Assets/Scenes/SampleScene3.unity', but no timestamp. This asset will be removed from the database. UnityEditor.AssetDatabase:Refresh() UVC.RefreshOnNewAsset:MoveAssetBack(String, String) (at C:/Users/olivier/Documents/Tests-UVC/checkout/trunk/New Unity Project/Packages/uversioncontrol-master/UVC.UnityVersionControl/UnityHooks/VCRefreshOnNewAsset.cs:167) UVC.RefreshOnNewAsset:ReMoveAssetOnVC(String, String) (at C:/Users/olivier/Documents/Tests-UVC/checkout/trunk/New Unity Project/Packages/uversioncontrol-master/UVC.UnityVersionControl/UnityHooks/VCRefreshOnNewAsset.cs:141) UVC.RefreshOnNewAsset:OnPostprocessAllAssets(String[], String[], String[], String[]) (at C:/Users/olivier/Documents/Tests-UVC/checkout/trunk/New Unity Project/Packages/uversioncontrol-master/UVC.UnityVersionControl/UnityHooks/VCRefreshOnNewAsset.cs:39) UnityEditor.AssetPostprocessingInternal:PostprocessAllAssets(String[], String[], String[], String[], String[])

VCException: svn: E155010: Path 'C:\Users\olivier\Documents\Tests-UVC\checkout\trunk\NewUnityProject\Assets\Scenes\SampleScene2.unity' does not exist

UVC.Backend.SVN.SVNCommands.ExecuteOperation (CommandLineExecution.CommandLine commandLine, System.Boolean useOperationLock) (at C:/Users/olivier/Documents/Tests-UVC/checkout/trunk/New Unity Project/Packages/uversioncontrol-master/UVC.SVNBackend/SVNCommands.cs:392) UVC.Backend.SVN.SVNCommands.CreateOperation (System.String arguments, System.Boolean onlyRunWhenActive) (at C:/Users/olivier/Documents/Tests-UVC/checkout/trunk/New Unity Project/Packages/uversioncontrol-master/UVC.SVNBackend/SVNCommands.cs:321) UVC.Backend.SVN.SVNCommands.Move (System.String from, System.String to) (at C:/Users/olivier/Documents/Tests-UVC/checkout/trunk/New Unity Project/Packages/uversioncontrol-master/UVC.SVNBackend/SVNCommands.cs:589) UVC.VCCDecorator.Move (System.String from, System.String to) (at C:/Users/olivier/Documents/Tests-UVC/checkout/trunk/New Unity Project/Packages/uversioncontrol-master/UVC.Common/VCCDecorator.cs:170) UVC.VCCAddMetaFiles.Move (System.String from, System.String to) (at C:/Users/olivier/Documents/Tests-UVC/checkout/trunk/New Unity Project/Packages/uversioncontrol-master/UVC.UnityVersionControl/API/VCCAddMetaFiles.cs:71) UVC.VCCDecorator.Move (System.String from, System.String to) (at C:/Users/olivier/Documents/Tests-UVC/checkout/trunk/New Unity Project/Packages/uversioncontrol-master/UVC.Common/VCCDecorator.cs:170) UVC.VCCFilteredAssets.Move (System.String from, System.String to) (at C:/Users/olivier/Documents/Tests-UVC/checkout/trunk/New Unity Project/Packages/uversioncontrol-master/UVC.VCCDecorators/VCCFilteredAssets.cs:136) UVC.VCCommands+cAnonStorey16.<>m0 () (at C:/Users/olivier/Documents/Tests-UVC/checkout/trunk/New Unity Project/Packages/uversioncontrol-master/UVC.UnityVersionControl/API/VCCommands.cs:593) UVC.VCCommands.HandleExceptions[T] (System.Func`1[TResult] func) (at C:/Users/olivier/Documents/Tests-UVC/checkout/trunk/New Unity Project/Packages/uversioncontrol-master/UVC.UnityVersionControl/API/VCCommands.cs:173) UnityEngine.Debug:LogException(Exception) UVC.VCExceptionHandler:HandleBase(VCException) (at C:/Users/olivier/Documents/Tests-UVC/checkout/trunk/New Unity Project/Packages/uversioncontrol-master/UVC.UnityVersionControl/GUI/Utility/VCExceptionHandler.cs:111) UVC.cAnonStorey0:<>m0() (at C:/Users/olivier/Documents/Tests-UVC/checkout/trunk/New Unity Project/Packages/uversioncontrol-master/UVC.UnityVersionControl/GUI/Utility/VCExceptionHandler.cs:47) UVC.OnNextUpdate:Update() (at C:/Users/olivier/Documents/Tests-UVC/checkout/trunk/New Unity Project/Packages/uversioncontrol-master/UVC.UnityVersionControl/Utility/OnNextUpdate.cs:50) UnityEditor.EditorApplication:Internal_CallUpdateFunctions()

VCException: svn: E200007: Cannot move path 'C:\Users\olivier\Documents\Tests-UVC\checkout\trunk\NewUnityProject\Assets\Scenes\SampleScene2.unity' into itself

UVC.Backend.SVN.SVNCommands.ExecuteOperation (CommandLineExecution.CommandLine commandLine, System.Boolean useOperationLock) (at C:/Users/olivier/Documents/Tests-UVC/checkout/trunk/New Unity Project/Packages/uversioncontrol-master/UVC.SVNBackend/SVNCommands.cs:392) UVC.Backend.SVN.SVNCommands.CreateOperation (System.String arguments, System.Boolean onlyRunWhenActive) (at C:/Users/olivier/Documents/Tests-UVC/checkout/trunk/New Unity Project/Packages/uversioncontrol-master/UVC.SVNBackend/SVNCommands.cs:321) UVC.Backend.SVN.SVNCommands.Move (System.String from, System.String to) (at C:/Users/olivier/Documents/Tests-UVC/checkout/trunk/New Unity Project/Packages/uversioncontrol-master/UVC.SVNBackend/SVNCommands.cs:589) UVC.VCCDecorator.Move (System.String from, System.String to) (at C:/Users/olivier/Documents/Tests-UVC/checkout/trunk/New Unity Project/Packages/uversioncontrol-master/UVC.Common/VCCDecorator.cs:170) UVC.VCCAddMetaFiles.Move (System.String from, System.String to) (at C:/Users/olivier/Documents/Tests-UVC/checkout/trunk/New Unity Project/Packages/uversioncontrol-master/UVC.UnityVersionControl/API/VCCAddMetaFiles.cs:71) UVC.VCCDecorator.Move (System.String from, System.String to) (at C:/Users/olivier/Documents/Tests-UVC/checkout/trunk/New Unity Project/Packages/uversioncontrol-master/UVC.Common/VCCDecorator.cs:170) UVC.VCCFilteredAssets.Move (System.String from, System.String to) (at C:/Users/olivier/Documents/Tests-UVC/checkout/trunk/New Unity Project/Packages/uversioncontrol-master/UVC.VCCDecorators/VCCFilteredAssets.cs:136) UVC.VCCommands+cAnonStorey16.<>m0 () (at C:/Users/olivier/Documents/Tests-UVC/checkout/trunk/New Unity Project/Packages/uversioncontrol-master/UVC.UnityVersionControl/API/VCCommands.cs:593) UVC.VCCommands.HandleExceptions[T] (System.Func`1[TResult] func) (at C:/Users/olivier/Documents/Tests-UVC/checkout/trunk/New Unity Project/Packages/uversioncontrol-master/UVC.UnityVersionControl/API/VCCommands.cs:173) UnityEngine.Debug:LogException(Exception) UVC.VCExceptionHandler:HandleBase(VCException) (at C:/Users/olivier/Documents/Tests-UVC/checkout/trunk/New Unity Project/Packages/uversioncontrol-master/UVC.UnityVersionControl/GUI/Utility/VCExceptionHandler.cs:111) UVC.cAnonStorey0:<>m0() (at C:/Users/olivier/Documents/Tests-UVC/checkout/trunk/New Unity Project/Packages/uversioncontrol-master/UVC.UnityVersionControl/GUI/Utility/VCExceptionHandler.cs:47) UVC.OnNextUpdate:Update() (at C:/Users/olivier/Documents/Tests-UVC/checkout/trunk/New Unity Project/Packages/uversioncontrol-master/UVC.UnityVersionControl/Utility/OnNextUpdate.cs:50) UnityEditor.EditorApplication:Internal_CallUpdateFunctions()

As a result, UVC reverts the rename that was made with TortoiseSVN.

In the UVC settings, "How to move and rename" is set to "Simple". Setting it to "None" fixes the issue (but then I think UVC will not detect renames and moves made inside Unity).