rtcTo / rtc2gitcli

An IBM's RTC SCM tool extension to migrate an RTC repository into a Git repository
https://rtc.to
MIT License
28 stars 34 forks source link

Moving directory in the root fails #35

Closed verhasi closed 6 years ago

verhasi commented 7 years ago

If the change set contains a move of a folder in the root of the sandbox under another folder it fails the following way [2017-06-27 14:27:13] com.ibm.team.rtc.cli.infrastructure.internal.core.CLIClientException: Cannot move share from /00_Documents to /0Archive_Inception/00_Documents because destination conflicts with existing share /0archive_inception at com.ibm.team.filesystem.cli.core.util.StatusHelper.toCLIClientException(StatusHelper.java:731) at com.ibm.team.filesystem.cli.core.AbstractSubcommand.run(AbstractSubcommand.java:53) at to.rtc.cli.migrate.command.RtcCommandDelegate.run(RtcCommandDelegate.java:35) at to.rtc.cli.migrate.command.AcceptCommandDelegate.run(AcceptCommandDelegate.java:33) at to.rtc.cli.migrate.RtcMigrator.acceptAndLoadChangeSet(RtcMigrator.java:114) at to.rtc.cli.migrate.RtcMigrator.accept(RtcMigrator.java:95) at to.rtc.cli.migrate.RtcMigrator.migrateTag(RtcMigrator.java:50) at to.rtc.cli.migrate.MigrateTo.run(MigrateTo.java:164) at to.rtc.cli.migrate.git.MigrateToGit.run(MigrateToGit.java:25) at com.ibm.team.filesystem.cli.core.AbstractSubcommand.run(AbstractSubcommand.java:51) at com.ibm.team.rtc.cli.infrastructure.internal.core.SubcommandLauncher.run(SubcommandLauncher.java:601) at com.ibm.team.rtc.cli.infrastructure.internal.core.SubcommandLauncher.doStart(SubcommandLauncher.java:370) at com.ibm.team.rtc.cli.infrastructure.internal.core.SubcommandLauncher.run(SubcommandLauncher.java:130) at com.ibm.team.rtc.cli.infrastructure.internal.Application.start(Application.java:41) at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:369) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:497) at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:620) at org.eclipse.equinox.launcher.Main.basicRun(Main.java:575) at org.eclipse.equinox.launcher.Main.run(Main.java:1408) at org.eclipse.equinox.launcher.Main.main(Main.java:1384) Caused by: java.lang.IllegalArgumentException: Cannot move share from /00_Documents to /0Archive_Inception/00_Documents because destination conflicts with existing share /0archive_inception at com.ibm.team.filesystem.client.internal.copyfileareas.CopyFileAreaStore$1.locking(CopyFileAreaStore.java:1426) at com.ibm.team.filesystem.client.internal.copyfileareas.BatchingLock.acquire(BatchingLock.java:362) at com.ibm.team.filesystem.client.internal.copyfileareas.CopyFileAreaStore.beginBatchingWithLock(CopyFileAreaStore.java:2309) at com.ibm.team.filesystem.client.internal.copyfileareas.CopyFileAreaStore.moveSharingInfo(CopyFileAreaStore.java:1416) at com.ibm.team.filesystem.client.internal.copyfileareas.CopyFileArea.moveInfo(CopyFileArea.java:342) at com.ibm.team.filesystem.client.internal.load.UpdateMutator.updateMetaDataAfterMove(UpdateMutator.java:3310) at com.ibm.team.filesystem.client.internal.load.UpdateMutator.move(UpdateMutator.java:1900) at com.ibm.team.filesystem.client.internal.load.UpdateMutator.moveSubtree(UpdateMutator.java:1853) at com.ibm.team.filesystem.client.internal.load.UpdateMutator.execute(UpdateMutator.java:2179) at com.ibm.team.filesystem.client.internal.operations.FileSystemOperation.run(FileSystemOperation.java:90) at com.ibm.team.filesystem.client.internal.operations.UpdateOperation.loadFileArea(UpdateOperation.java:450) at com.ibm.team.filesystem.client.internal.operations.UpdateOperation.updateCopyFileArea(UpdateOperation.java:316) at com.ibm.team.filesystem.client.internal.operations.UpdateOperation.access$0(UpdateOperation.java:276) at com.ibm.team.filesystem.client.internal.operations.UpdateOperation$1.run(UpdateOperation.java:246) at com.ibm.team.filesystem.rcp.core.internal.resources.ResourceSharingManager$1.run(ResourceSharingManager.java:77) at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:1975) at com.ibm.team.filesystem.rcp.core.internal.resources.ResourceSharingManager.runWithinFileSystemLock(ResourceSharingManager.java:89) at com.ibm.team.filesystem.client.internal.operations.FileSystemOperation.runWithinFileSystemLock(FileSystemOperation.java:165) at com.ibm.team.filesystem.client.internal.operations.FileSystemOperation.runWithinFileSystemLock(FileSystemOperation.java:145) at com.ibm.team.filesystem.client.internal.operations.UpdateOperation.execute(UpdateOperation.java:268) at com.ibm.team.filesystem.client.internal.operations.FileSystemOperation.run(FileSystemOperation.java:90) at com.ibm.team.filesystem.client.internal.operations.WorkspaceUpdateOperation.doAccept(WorkspaceUpdateOperation.java:916) at com.ibm.team.filesystem.client.internal.operations.WorkspaceUpdateOperation.access$0(WorkspaceUpdateOperation.java:837) at com.ibm.team.filesystem.client.internal.operations.WorkspaceUpdateOperation$1.run(WorkspaceUpdateOperation.java:741) at com.ibm.team.filesystem.rcp.core.internal.resources.ResourceSharingManager$1.run(ResourceSharingManager.java:77) at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:1975) at com.ibm.team.filesystem.rcp.core.internal.resources.ResourceSharingManager.runWithinFileSystemLock(ResourceSharingManager.java:89) at com.ibm.team.filesystem.client.internal.operations.FileSystemOperation.runWithinFileSystemLock(FileSystemOperation.java:165) at com.ibm.team.filesystem.client.internal.operations.FileSystemOperation.runWithinFileSystemLock(FileSystemOperation.java:145) at com.ibm.team.filesystem.client.internal.operations.WorkspaceUpdateOperation.execute(WorkspaceUpdateOperation.java:753) at com.ibm.team.filesystem.client.internal.operations.FileSystemOperation.run(FileSystemOperation.java:90) at com.ibm.team.filesystem.client.internal.rest.util.WorkspaceUpdateUtil.workspaceUpdate(WorkspaceUpdateUtil.java:123) at com.ibm.team.filesystem.rcp.core.internal.rest.FilesystemRestClient.postWorkspaceUpdate(FilesystemRestClient.java:859) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:497) at com.ibm.team.filesystem.client.daemon.JSONHandler.handle(JSONHandler.java:322) at com.ibm.team.filesystem.client.internal.http.HttpConnection.readNextRequest(HttpConnection.java:628) at com.ibm.team.filesystem.client.internal.http.HttpConnection$1.run(HttpConnection.java:470) at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54) at com.ibm.team.repository.common.internal.marshal.util.MarshallerUtil.decodeExceptions(MarshallerUtil.java:364) at com.ibm.team.repository.common.serialize.internal.JSONDeserializer.deserializeErrorObj(JSONDeserializer.java:957) at com.ibm.team.filesystem.client.internal.marshalling.ExceptionHandlingJSONDeserializer.deserializeErrorObj(ExceptionHandlingJSONDeserializer.java:128) at com.ibm.team.repository.common.serialize.internal.JSONDeserializer.deserializeException(JSONDeserializer.java:933) at com.ibm.team.filesystem.client.internal.marshalling.EObjectJSONDeserializer.deserializeError(EObjectJSONDeserializer.java:71) at com.ibm.team.filesystem.client.restproxy.RestInvocationHandler.executeRequest(RestInvocationHandler.java:267) at com.ibm.team.filesystem.client.restproxy.RestInvocationHandler.executeAndReturnResult(RestInvocationHandler.java:221) at com.ibm.team.filesystem.client.restproxy.RestInvocationHandler.invokeInternal(RestInvocationHandler.java:368) at com.ibm.team.filesystem.client.restproxy.RestInvocationHandler.invoke(RestInvocationHandler.java:311) at com.sun.proxy.$Proxy0.postWorkspaceUpdate(Unknown Source) at com.ibm.team.filesystem.cli.client.internal.subcommands.AcceptCmd.run(AcceptCmd.java:152) at com.ibm.team.filesystem.cli.core.AbstractSubcommand.run(AbstractSubcommand.java:51) ... 25 more java.lang.RuntimeException: com.ibm.team.rtc.cli.infrastructure.internal.core.CLIClientException: Cannot move share from /00_Documents to /0Archive_Inception/00_Documents because destination conflicts with existing share /0archive_inception at to.rtc.cli.migrate.MigrateTo.run(MigrateTo.java:168) at to.rtc.cli.migrate.git.MigrateToGit.run(MigrateToGit.java:25) at com.ibm.team.filesystem.cli.core.AbstractSubcommand.run(AbstractSubcommand.java:51) at com.ibm.team.rtc.cli.infrastructure.internal.core.SubcommandLauncher.run(SubcommandLauncher.java:601) at com.ibm.team.rtc.cli.infrastructure.internal.core.SubcommandLauncher.doStart(SubcommandLauncher.java:370) at com.ibm.team.rtc.cli.infrastructure.internal.core.SubcommandLauncher.run(SubcommandLauncher.java:130) at com.ibm.team.rtc.cli.infrastructure.internal.Application.start(Application.java:41) at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:369) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:497) at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:620) at org.eclipse.equinox.launcher.Main.basicRun(Main.java:575) at org.eclipse.equinox.launcher.Main.run(Main.java:1408) at org.eclipse.equinox.launcher.Main.main(Main.java:1384) Caused by: com.ibm.team.rtc.cli.infrastructure.internal.core.CLIClientException: Cannot move share from /00_Documents to /0Archive_Inception/00_Documents because destination conflicts with existing share /0archive_inception at com.ibm.team.filesystem.cli.core.util.StatusHelper.toCLIClientException(StatusHelper.java:731) at com.ibm.team.filesystem.cli.core.AbstractSubcommand.run(AbstractSubcommand.java:53) at to.rtc.cli.migrate.command.RtcCommandDelegate.run(RtcCommandDelegate.java:35) at to.rtc.cli.migrate.command.AcceptCommandDelegate.run(AcceptCommandDelegate.java:33) at to.rtc.cli.migrate.RtcMigrator.acceptAndLoadChangeSet(RtcMigrator.java:114) at to.rtc.cli.migrate.RtcMigrator.accept(RtcMigrator.java:95) at to.rtc.cli.migrate.RtcMigrator.migrateTag(RtcMigrator.java:50) at to.rtc.cli.migrate.MigrateTo.run(MigrateTo.java:164) ... 19 more Caused by: java.lang.IllegalArgumentException: Cannot move share from /00_Documents to /0Archive_Inception/00_Documents because destination conflicts with existing share /0archive_inception at com.ibm.team.filesystem.client.internal.copyfileareas.CopyFileAreaStore$1.locking(CopyFileAreaStore.java:1426) at com.ibm.team.filesystem.client.internal.copyfileareas.BatchingLock.acquire(BatchingLock.java:362) at com.ibm.team.filesystem.client.internal.copyfileareas.CopyFileAreaStore.beginBatchingWithLock(CopyFileAreaStore.java:2309) at com.ibm.team.filesystem.client.internal.copyfileareas.CopyFileAreaStore.moveSharingInfo(CopyFileAreaStore.java:1416) at com.ibm.team.filesystem.client.internal.copyfileareas.CopyFileArea.moveInfo(CopyFileArea.java:342) at com.ibm.team.filesystem.client.internal.load.UpdateMutator.updateMetaDataAfterMove(UpdateMutator.java:3310) at com.ibm.team.filesystem.client.internal.load.UpdateMutator.move(UpdateMutator.java:1900) at com.ibm.team.filesystem.client.internal.load.UpdateMutator.moveSubtree(UpdateMutator.java:1853) at com.ibm.team.filesystem.client.internal.load.UpdateMutator.execute(UpdateMutator.java:2179) at com.ibm.team.filesystem.client.internal.operations.FileSystemOperation.run(FileSystemOperation.java:90) at com.ibm.team.filesystem.client.internal.operations.UpdateOperation.loadFileArea(UpdateOperation.java:450) at com.ibm.team.filesystem.client.internal.operations.UpdateOperation.updateCopyFileArea(UpdateOperation.java:316) at com.ibm.team.filesystem.client.internal.operations.UpdateOperation.access$0(UpdateOperation.java:276) at com.ibm.team.filesystem.client.internal.operations.UpdateOperation$1.run(UpdateOperation.java:246) at com.ibm.team.filesystem.rcp.core.internal.resources.ResourceSharingManager$1.run(ResourceSharingManager.java:77) at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:1975) at com.ibm.team.filesystem.rcp.core.internal.resources.ResourceSharingManager.runWithinFileSystemLock(ResourceSharingManager.java:89) at com.ibm.team.filesystem.client.internal.operations.FileSystemOperation.runWithinFileSystemLock(FileSystemOperation.java:165) at com.ibm.team.filesystem.client.internal.operations.FileSystemOperation.runWithinFileSystemLock(FileSystemOperation.java:145) at com.ibm.team.filesystem.client.internal.operations.UpdateOperation.execute(UpdateOperation.java:268) at com.ibm.team.filesystem.client.internal.operations.FileSystemOperation.run(FileSystemOperation.java:90) at com.ibm.team.filesystem.client.internal.operations.WorkspaceUpdateOperation.doAccept(WorkspaceUpdateOperation.java:916) at com.ibm.team.filesystem.client.internal.operations.WorkspaceUpdateOperation.access$0(WorkspaceUpdateOperation.java:837) at com.ibm.team.filesystem.client.internal.operations.WorkspaceUpdateOperation$1.run(WorkspaceUpdateOperation.java:741) at com.ibm.team.filesystem.rcp.core.internal.resources.ResourceSharingManager$1.run(ResourceSharingManager.java:77) at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:1975) at com.ibm.team.filesystem.rcp.core.internal.resources.ResourceSharingManager.runWithinFileSystemLock(ResourceSharingManager.java:89) at com.ibm.team.filesystem.client.internal.operations.FileSystemOperation.runWithinFileSystemLock(FileSystemOperation.java:165) at com.ibm.team.filesystem.client.internal.operations.FileSystemOperation.runWithinFileSystemLock(FileSystemOperation.java:145) at com.ibm.team.filesystem.client.internal.operations.WorkspaceUpdateOperation.execute(WorkspaceUpdateOperation.java:753) at com.ibm.team.filesystem.client.internal.operations.FileSystemOperation.run(FileSystemOperation.java:90) at com.ibm.team.filesystem.client.internal.rest.util.WorkspaceUpdateUtil.workspaceUpdate(WorkspaceUpdateUtil.java:123) at com.ibm.team.filesystem.rcp.core.internal.rest.FilesystemRestClient.postWorkspaceUpdate(FilesystemRestClient.java:859) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:497) at com.ibm.team.filesystem.client.daemon.JSONHandler.handle(JSONHandler.java:322) at com.ibm.team.filesystem.client.internal.http.HttpConnection.readNextRequest(HttpConnection.java:628) at com.ibm.team.filesystem.client.internal.http.HttpConnection$1.run(HttpConnection.java:470) at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54) at com.ibm.team.repository.common.internal.marshal.util.MarshallerUtil.decodeExceptions(MarshallerUtil.java:364) at com.ibm.team.repository.common.serialize.internal.JSONDeserializer.deserializeErrorObj(JSONDeserializer.java:957) at com.ibm.team.filesystem.client.internal.marshalling.ExceptionHandlingJSONDeserializer.deserializeErrorObj(ExceptionHandlingJSONDeserializer.java:128) at com.ibm.team.repository.common.serialize.internal.JSONDeserializer.deserializeException(JSONDeserializer.java:933) at com.ibm.team.filesystem.client.internal.marshalling.EObjectJSONDeserializer.deserializeError(EObjectJSONDeserializer.java:71) at com.ibm.team.filesystem.client.restproxy.RestInvocationHandler.executeRequest(RestInvocationHandler.java:267) at com.ibm.team.filesystem.client.restproxy.RestInvocationHandler.executeAndReturnResult(RestInvocationHandler.java:221) at com.ibm.team.filesystem.client.restproxy.RestInvocationHandler.invokeInternal(RestInvocationHandler.java:368) at com.ibm.team.filesystem.client.restproxy.RestInvocationHandler.invoke(RestInvocationHandler.java:311) at com.sun.proxy.$Proxy0.postWorkspaceUpdate(Unknown Source) at com.ibm.team.filesystem.cli.client.internal.subcommands.AcceptCmd.run(AcceptCmd.java:152) at com.ibm.team.filesystem.cli.core.AbstractSubcommand.run(AbstractSubcommand.java:51) ... 25 more

My temporary workaround is to delete all but .git, load again, delete all but .git .jazz5 .metadata and run again. In this way it adds a new inital commit an miss the failed commit but continues. I also patched it not create inital commit in case the .git already exists but still missing one commit that failed. Actually the changes are commited with the next commit.

Regards, Istvan

verhasi commented 6 years ago

Upgrading Jazz to version 6 solved the issue.