Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to run the command line extension with 6.x RTC #44

Open
ruhullahshah opened this issue Feb 13, 2018 · 28 comments
Open

Unable to run the command line extension with 6.x RTC #44

ruhullahshah opened this issue Feb 13, 2018 · 28 comments

Comments

@ruhullahshah
Copy link

Hello,

I ran the steps mentioned at https://github.com/rtcTo/rtc2gitcli/wiki/Setup but I get the following error while running the launch configuration rtc2git

Error:
Problem running 'help':
Unknown subcommand "migrate-to-git". Try 'scm help' for more information.

Any pointers for me to proceed?

@WtfJoke
Copy link
Member

WtfJoke commented Feb 14, 2018

Hi

Could you provide details to your used rtc-version and the libs you used?
Does your workspace contain any errors?

You could also try to run the provided docker image: https://github.com/rtcTo/rtc2git-docker

@ruhullahshah
Copy link
Author

Hi,

  • We are using RTC version : 6.0.4
  • The workspace has no errors. FYR, I attached a snapshot.
    workspace-snapshot
    In case it doesn't work, I will try to workout with a docker image. I am still using Windows 7 and docker is a bit rusty on this platform, that's why I am avoiding this route for now.

@WtfJoke
Copy link
Member

WtfJoke commented Feb 17, 2018

#41 had the same issue and I also were able to reproduce it. Somehow I guided @ycon that it worked for him... But I cant find my tipps.

@ruhullahshah
Copy link
Author

No problem. I have patched https://github.com/rtcTo/rtc2git to suit my use cases for now and in case there is a need to switch to the Java variant, I will end up using the Docker Image probably.

@himmakam
Copy link

I am facing the same issue now that after cloning and while running the launch configuration rtc2git

Error:
Problem running 'help':
Unknown subcommand "migrate-to-git". Try 'scm help' for more information.
I checked all issues and looks like am not able to find the solution to fix this. Please help here.

@WtfJoke
Copy link
Member

WtfJoke commented Apr 16, 2018

There is currently no solution. It seems rtc2gitcli not compatible with the rtc 6.x libs.

I dont know if the docker image is facing the same problem.

Maybe you can make it with rtc2git, investigate the issue here yourself or wait.

@himmakam
Copy link

We use RTC 5.0.2. so it is not the case with 6.x libs right?

@himmakam
Copy link

sorry, I used scmtools 6.x before. but now am using 5.0.2 and now getting the below error - How can I get rid of this one.

com.ibm.team.rtc.cli.infrastructure.internal.core.ISubcommandDefinition$LoadOptionsException: org.eclipse.core.runtime.CoreException: Plug-in to.rtc.cli.migrate was unable to load class to.rtc.cli.migrate.git.MigrateToGitOptions.
at com.ibm.team.rtc.cli.infrastructure.internal.core.SubcommandDefinition.getOptions(SubcommandDefinition.java:107)
at com.ibm.team.rtc.cli.infrastructure.internal.subcommands.HelpCmd.showSubcommand(HelpCmd.java:280)
at com.ibm.team.rtc.cli.infrastructure.internal.subcommands.HelpCmd.showSubCommand(HelpCmd.java:243)
at com.ibm.team.rtc.cli.infrastructure.internal.subcommands.HelpCmd.run(HelpCmd.java:112)
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(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
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: org.eclipse.core.runtime.CoreException: Plug-in to.rtc.cli.migrate was unable to load class to.rtc.cli.migrate.git.MigrateToGitOptions.
at org.eclipse.core.internal.registry.osgi.RegistryStrategyOSGI.throwException(RegistryStrategyOSGI.java:194)
at org.eclipse.core.internal.registry.osgi.RegistryStrategyOSGI.createExecutableExtension(RegistryStrategyOSGI.java:176)
at org.eclipse.core.internal.registry.ExtensionRegistry.createExecutableExtension(ExtensionRegistry.java:904)
at org.eclipse.core.internal.registry.ConfigurationElement.createExecutableExtension(ConfigurationElement.java:243)
at org.eclipse.core.internal.registry.ConfigurationElementHandle.createExecutableExtension(ConfigurationElementHandle.java:55)
at com.ibm.team.rtc.cli.infrastructure.internal.core.SubcommandDefinition.getOptions(SubcommandDefinition.java:105)

@WtfJoke
Copy link
Member

WtfJoke commented Apr 16, 2018

Please create a separate issue for that.

Also please include if you workspace has any errors.

@himmakam
Copy link

ok, logged #46

@WtfJoke WtfJoke changed the title Unable to run the command line extension Unable to run the command line extension with 6.x RTC Apr 18, 2018
@solzun
Copy link

solzun commented Jun 12, 2018

Ran into the same issue (despite it building fine, no errors, no issues with the target platform as per the Wiki, all Maven dependencies downloading locally just fine.)

There is a workaround you can do (I've verified this is working on my RTC 6.0.4 instance) to get this working outside of the Eclipse run configuration.

Once you have everything building/compiling fine in Eclipse, right-click on the cli.extension project from Eclipse Navigator (or whatever project you called it during import), select Export, expand Plug-in Development and select Deployable plug-ins and fragments, hit Next. Choose a directory destination to export this plug-in jar to (I used the target directory within the project), and hit Finish.

That will export this jar, go to the directory and copy it (was named, by default, to.rtc.cli.migrate_1.0.1.jar in my instance) to the plugins directory in your SCMTools directory (.../path/to/jazz/scmtools/eclipse/plugins).

Once you drop the plug-in .jar in that directory, open a command-line and go to the eclipse directory in that same SCMTools instance where scm.exe exists.
Run:

  • scm -clean
  • scm help

You should see the command migrate-to-git

@kaiilin
Copy link

kaiilin commented Jun 26, 2018

@solzun thanks. I am upgrading from RTC v5.0.2 to RTC 6.0.6. I am able to run the migration tool following your steps.

@WtfJoke
Copy link
Member

WtfJoke commented Jul 10, 2018

Thanks a lot solzun for giving this workaround. This will help a lot of people :)
I verified this and linked to your comment in the readme (I didnt need to run scm -clean)

@wtsiamruk
Copy link

seems that the above solution not working on 6.0.5

@solzun
Copy link

solzun commented Jan 5, 2019

What is the issue you receive on 6.0.5? The only gotcha I have noticed that was introduced after 6.0.2 is that the "scm load" fails if the repository workspace was loaded elsewhere prior to executing the integration. The load command now has an override/force switch to load the sandbox regardless of the server knows it was previously loaded elsewhere.

@wtsiamruk
Copy link

What is the issue you receive on 6.0.5? The only gotcha I have noticed that was introduced after 6.0.2 is that the "scm load" fails if the repository workspace was loaded elsewhere prior to executing the integration. The load command now has an override/force switch to load the sandbox regardless of the server knows it was previously loaded elsewhere.

Exact same issue that is on very first message here, got resolved with downgrade to 6.0.4

@amgriffi
Copy link

I followed solzun's workaround and I can see the command migrate-to-git when I run scm help from the command line window inside the SCMtools eclipse directory. But, when I try to run the rtc2git.launch inside of Eclipse, I still get the same error. Is there something else I need to do in Eclipse to get it to work?

@WtfJoke
Copy link
Member

WtfJoke commented Feb 21, 2019

@amgriffi After you copied the jar which is mentioned in solzun's workaround, you dont need eclipse for starting rtc2gitcli. (therefore you dont need to run the rtc2git.launch inside eclipse).

You simply type scm -help in your regular cmd or in the scmtools folder (where you copied the jar), then it should work :)

EDIT: Sorry for my late answer

@amgriffi
Copy link

@WtfJoke Yes, thank you, I eventually figured that out.

@MangeshDeshmane-ibm
Copy link

Hello,

I am performing RTC to git migration using cli.extension

Eclipse photon setup with RTC 6.0.4

I am facing below error
java.lang.RuntimeException: com.ibm.team.rtc.cli.infrastructure.internal.core.CLIClientException: java.lang.RuntimeException: com.ibm.team.rtc.cli.infrastructure.internal.core.CLIClientException

@MangeshDeshmane-ibm
Copy link

@solzun ,

can't find export option in your provided solution

Once you have everything building/compiling fine in Eclipse, right-click on the cli.extension project from Eclipse Navigator (or whatever project you called it during import), select Export, expand Plug-in Development and select Deployable plug-ins and fragments, hit Next. Choose a directory destination to export this plug-in jar to (I used the target directory within the project), and hit Finish.

@ghost
Copy link

ghost commented Dec 5, 2019

@solzun I am able to run migrate-to-git command following your steps. But now I am getting following error. Can you please help on this

[2019-12-05 17:43:33] org.eclipse.jgit.api.errors.JGitInternalException: Exception caught during execution of add command
at org.eclipse.jgit.api.AddCommand.call(AddCommand.java:246)
at to.rtc.cli.migrate.git.GitMigrator.gitCommit(GitMigrator.java:228)
at to.rtc.cli.migrate.git.GitMigrator.init(GitMigrator.java:435)
at to.rtc.cli.migrate.MigrateTo.run(MigrateTo.java:147)
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(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
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)
Caused by: java.io.IOException: The process cannot access the file because another process has locked a portion of the file
at java.io.FileInputStream.read0(Native Method)
at java.io.FileInputStream.read(Unknown Source)
at org.eclipse.jgit.util.IO.readWholeStream(IO.java:216)
at org.eclipse.jgit.treewalk.WorkingTreeIterator.possiblyFilteredInputStream(WorkingTreeIterator.java:384)
at org.eclipse.jgit.treewalk.WorkingTreeIterator.getEntryContentLength(WorkingTreeIterator.java:559)
at org.eclipse.jgit.api.AddCommand.call(AddCommand.java:226)
... 21 more
Migration took [36] s
Unexpected exception
com.ibm.team.rtc.cli.infrastructure.internal.core.CLIClientException: org.eclipse.jgit.api.errors.JGitInternalException: Exception caught during execution of add command
at com.ibm.team.filesystem.cli.core.util.StatusHelper.toCLIClientException(StatusHelper.java:801)
at com.ibm.team.filesystem.cli.core.AbstractSubcommand.run(AbstractSubcommand.java:53)
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(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
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)
Caused by: java.lang.RuntimeException: org.eclipse.jgit.api.errors.JGitInternalException: Exception caught during execution of add command
at to.rtc.cli.migrate.MigrateTo.run(MigrateTo.java:180)
at to.rtc.cli.migrate.git.MigrateToGit.run(MigrateToGit.java:25)
at com.ibm.team.filesystem.cli.core.AbstractSubcommand.run(AbstractSubcommand.java:51)
... 16 more
Caused by: org.eclipse.jgit.api.errors.JGitInternalException: Exception caught during execution of add command
at org.eclipse.jgit.api.AddCommand.call(AddCommand.java:246)
at to.rtc.cli.migrate.git.GitMigrator.gitCommit(GitMigrator.java:228)
at to.rtc.cli.migrate.git.GitMigrator.init(GitMigrator.java:435)
at to.rtc.cli.migrate.MigrateTo.run(MigrateTo.java:147)
... 18 more
Caused by: java.io.IOException: The process cannot access the file because another process has locked a portion of the file
at java.io.FileInputStream.read0(Native Method)
at java.io.FileInputStream.read(Unknown Source)
at org.eclipse.jgit.util.IO.readWholeStream(IO.java:216)
at org.eclipse.jgit.treewalk.WorkingTreeIterator.possiblyFilteredInputStream(WorkingTreeIterator.java:384)
at org.eclipse.jgit.treewalk.WorkingTreeIterator.getEntryContentLength(WorkingTreeIterator.java:559)
at org.eclipse.jgit.api.AddCommand.call(AddCommand.java:226)
... 21 more

@smartarix
Copy link

I perfromed migration for some of my project from RTC to Bitbucket, however observed some descripencies.

  1. .zip file migrated from RTC to BB but no RTC history migrated to Bitbucket
    2, .xlsx file migrated but has more history in BB than RTC

@ghost
Copy link

ghost commented Nov 6, 2020

@solzun thanks. I am upgrading from RTC v5.0.2 to RTC 6.0.6. I am able to run the migration tool following your steps.

Could you please share exact steps? Have you performed migration with this tool?

@solzun
Copy link

solzun commented Mar 9, 2023

@solzun I am able to run migrate-to-git command following your steps. But now I am getting following error. Can you please help on this

[2019-12-05 17:43:33] org.eclipse.jgit.api.errors.JGitInternalException: Exception caught during execution of add command at org.eclipse.jgit.api.AddCommand.call(AddCommand.java:246) at to.rtc.cli.migrate.git.GitMigrator.gitCommit(GitMigrator.java:228) at to.rtc.cli.migrate.git.GitMigrator.init(GitMigrator.java:435) at to.rtc.cli.migrate.MigrateTo.run(MigrateTo.java:147) 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(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) 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) Caused by: java.io.IOException: The process cannot access the file because another process has locked a portion of the file at java.io.FileInputStream.read0(Native Method) at java.io.FileInputStream.read(Unknown Source) at org.eclipse.jgit.util.IO.readWholeStream(IO.java:216) at org.eclipse.jgit.treewalk.WorkingTreeIterator.possiblyFilteredInputStream(WorkingTreeIterator.java:384) at org.eclipse.jgit.treewalk.WorkingTreeIterator.getEntryContentLength(WorkingTreeIterator.java:559) at org.eclipse.jgit.api.AddCommand.call(AddCommand.java:226) ... 21 more Migration took [36] s Unexpected exception com.ibm.team.rtc.cli.infrastructure.internal.core.CLIClientException: org.eclipse.jgit.api.errors.JGitInternalException: Exception caught during execution of add command at com.ibm.team.filesystem.cli.core.util.StatusHelper.toCLIClientException(StatusHelper.java:801) at com.ibm.team.filesystem.cli.core.AbstractSubcommand.run(AbstractSubcommand.java:53) 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(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) 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) Caused by: java.lang.RuntimeException: org.eclipse.jgit.api.errors.JGitInternalException: Exception caught during execution of add command at to.rtc.cli.migrate.MigrateTo.run(MigrateTo.java:180) at to.rtc.cli.migrate.git.MigrateToGit.run(MigrateToGit.java:25) at com.ibm.team.filesystem.cli.core.AbstractSubcommand.run(AbstractSubcommand.java:51) ... 16 more Caused by: org.eclipse.jgit.api.errors.JGitInternalException: Exception caught during execution of add command at org.eclipse.jgit.api.AddCommand.call(AddCommand.java:246) at to.rtc.cli.migrate.git.GitMigrator.gitCommit(GitMigrator.java:228) at to.rtc.cli.migrate.git.GitMigrator.init(GitMigrator.java:435) at to.rtc.cli.migrate.MigrateTo.run(MigrateTo.java:147) ... 18 more Caused by: java.io.IOException: The process cannot access the file because another process has locked a portion of the file at java.io.FileInputStream.read0(Native Method) at java.io.FileInputStream.read(Unknown Source) at org.eclipse.jgit.util.IO.readWholeStream(IO.java:216) at org.eclipse.jgit.treewalk.WorkingTreeIterator.possiblyFilteredInputStream(WorkingTreeIterator.java:384) at org.eclipse.jgit.treewalk.WorkingTreeIterator.getEntryContentLength(WorkingTreeIterator.java:559) at org.eclipse.jgit.api.AddCommand.call(AddCommand.java:226) ... 21 more

Yes, I had the same error, what I found is that for the first few changesets, typically, where the team established the entire codebase so there are probably thousands of files in those first few commits, the Git commit didn't yet finish before control released back to the Java process orchestrating the entire workflow and you run into what is probably a filesystem contention/race-condition issue. I simply restart the process over-and-over until it finished and ran, which it did, so I wrapped my "scm migrate-to-git" calls in a loop (Powershell, Bash, whatever you want to use) to keep restarting it until it worked.
Because your "middle-man" repository workspace is tracking which changeset it's currently scoped to for loading into the Git repo and committing, it should pick up form where it left off. It's been years since I did this, I can't remember if the script restarts just fine from the current changeset in that middle-man RTC repository workspace, or if I had to put in a piece of loop code that would rewind the changeset to restart it on that commit again, you'll have to test to verify.

@solzun
Copy link

solzun commented Mar 9, 2023

I perfromed migration for some of my project from RTC to Bitbucket, however observed some descripencies.

  1. .zip file migrated from RTC to BB but no RTC history migrated to Bitbucket
    2, .xlsx file migrated but has more history in BB than RTC

If you aren't seeing history, it's probably something one of two things happening:

  • Your RTC history you scoped to for your "source" RTC repository workspace doesn't match what you -think- it should (you are scoping to a snapshot/stream that doesn't have the history you expect from another snapshot/stream.) That workspace delineates exactly what RTC history you want to migrate (either being a snapshot, stream history, workspace history, or manually via component baselines added into a workspace.) I'd look at what you used and see what RTC history that zip file has in that history line you took. The tool aligns the RTC commit author and changeset comment with the Git commit author and commit message, you should be able to align them and see where it may have duplicated a changeset commit or where it's getting other references.
  • As to what is happening with your Excel file more history, there is a piece of the code that if it detects stream gaps when it accepts, it will try to accept the missing changesets to fulfill the gap (RTC's moronic history requirements), so it could be bringing in more changesets to fulfill a gap to accept the changeset that not only modified the Excel file but also may have another file in the same changeset that is entangled, and those changesets could be further up the history line and going early.

@solzun
Copy link

solzun commented Mar 9, 2023

What is the issue you receive on 6.0.5? The only gotcha I have noticed that was introduced after 6.0.2 is that the "scm load" fails if the repository workspace was loaded elsewhere prior to executing the integration. The load command now has an override/force switch to load the sandbox regardless of the server knows it was previously loaded elsewhere.

Exact same issue that is on very first message here, got resolved with downgrade to 6.0.4

Strange, it's a good thing that IBM supports n-1 compatibility, so using 6.0.4's CLI should work even going into the current 7.x releases, we'll be doing this again soon, so I'll check compatibility with 7.x.

I'm pretty sure I did this with 6.0.6.1 with modern iFix patches applied, but it's been years, I can't recall off the top of my head. I'll report here if it's an issue.

@solzun
Copy link

solzun commented Mar 9, 2023

@solzun thanks. I am upgrading from RTC v5.0.2 to RTC 6.0.6. I am able to run the migration tool following your steps.

Could you please share exact steps? Have you performed migration with this tool?

The README.MD on the landing page for this repo explains the steps, the command is the best part to understand: scm migrate-to-git -r <uri> -u <username> -P <password> -m <migration.properties> <SOURCE_WORKSPACE> <TARGET_WORKSPACE>

This is also key:

create an source RTC workspace with flow target and components as wanted → SOURCE_WORKSPACE

create an target RTC workspace with SOURCE_WORKPSACE as flow target → TARGET_WORKSPACE

Really, if you want to successfully run this, you need to understand the concepts of what you're doing, once you know, you can work backwards into RTC Eclipse to set everything up and validate it. When I have to re-run this and get it fresh in my head again, I'll update the README.MD documentation to be more specific, but for now, this is what I recall:

  • Your SOURCE_WORKSPACE is a RTC repository workspace (just server side, doesn't need to be loaded) that should have a flow target back to a stream that contains the history you want to migrate to Git (and that history is either a stream based off: a snapshot, another workspace history, or manually via component baselines one-by-one to your liking.) This SOURCE_WORKSPACE should be at the same history of the flow target it's flowing to (which RTC does by default if you create this workspace from that source history, diff it in RTC Eclipse to 100% validate there are no changes missing or different.)

  • Your TARGET_WORKSPACE is a RTC repository workspace (server-side but also you will load it onto disk, this is where it will reside along with the empty Git repo so it's loading directly into the same directory that Git is committing the history changeset-by-changeset.) This TARGET_WORKSPACE sets its flow target to the SOURCE_WORKSPACE.

The key thing here is you need to 'zeroize/nullify' the history for one of the workspaces, and I cannot recall if it's the SOURCE_WORKSPACE or TARGET_WORKSPACE, meaning, you need to add all the same component(s) from your flow target of history and then right-click those components in RTC Eclipse and reset them to "1: Initial Baseline" which is the first baseline of any component when it first is created and empty. This sets the history to nothing for the workspace.

When you kick off the script, what it does is it diffs the workspace against the flow target's history, aggregates the total amount of changesets, orders them by created date (it should do this by delivery date, but I don't think this feature was around in RTC when this plugin was written, probably a good pull request to make it an option so your history is "harmonized" in RTC-speak), then it puts those changesets, in created order, in an array and just walks through the loop: accept the changeset into the TARGET_WORKSPACE, load it to disk, then git-commit it, amend the Git commit to match the author and commit-time, then wash-rinse-repeat until you've processed all changesets.

When I run this again soon, I'll put in a PR for the README.MD to really nail this down.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

9 participants