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

Migrating multiple Streams overwrites branches content. #164

Open
Qusai3toon opened this issue Sep 27, 2021 · 5 comments
Open

Migrating multiple Streams overwrites branches content. #164

Qusai3toon opened this issue Sep 27, 2021 · 5 comments

Comments

@Qusai3toon
Copy link

Qusai3toon commented Sep 27, 2021

Hello @WtfJoke,
Thanks for this amazing tool,
I am almost done with my work, but there is this last problem that I'm facing now.

The problem is that when I migrate the second stream what happens is that I find the names of the two branches but when I check their content, What I see is that the content of the first migrated stream is in both branches and none of the second stream is there**(Both branches have the first branch files)**.

please tell me if there are any variables I need to add them to the configuration file so I can make it work properly

Here is the configuration file :

[General]
Repo= RepoUrl
User= Username
Password= Password
GIT-Reponame = migratedRepo.git
WorkspaceName= C:\Users\QusaiAtoon\workspace85
Directory = C:\Users\QusaiAtoon\MigrateHere
useExistingWorkspace = true

[Migration]
StreamToMigrate = MyStraemName
@WtfJoke
Copy link
Member

WtfJoke commented Sep 28, 2021

I think I dont fully understand the problem. You tried to migrate two streams to the same git repo, correct?

And when you migrated the second stream you dont have the data of the second stream?

But you have a branch called like the second stream?

When you run the migration on an existing repo it will create a new branch from the current branch. If the current branch contains data of the first stream, then maybe migration of the second stream doesnt work for some reason. You should be able to figure out by inspecting the logs (or provide them).

Should the two streams belong to the same git repo? Or are you better of to habe 1 git repo for 1 stream?

@Qusai3toon
Copy link
Author

@WtfJoke Thanks for the respond,

As you said when I migrate the second stream into the same GIT repo a second branch is created with the name of the stream (As expected and all is good so far), but when I look into the files I see that the files of the second stream are not in the second branch I just find the files of the first branch (First Migrated Stream)

Here is the output of the first Stream Migration

refs/heads/ApplicationA
refs/heads/ApplicationA_branchpoint
16:53:30 - Migration will take place in C:\Users\QusaiAtoon\MigrateHere2
Initialized empty Git repository in C:/Users/QusaiAtoon/MigrateHere2/migratedRepoD.git/
16:53:30 - Repository was created in C:\Users\QusaiAtoon\MigrateHere2
Cloning into 'migratedRepoD'...
warning: You appear to have cloned an empty repository.
done.
16:53:30 - Set core.ignorecase to false
Problem running 'login':
Could not log in to https://clm.inspirejo.com:9443/ccm as user 'baha': CRJAZ0124E The user name or password is invalid.Try logout and re-login with the updated credentials if the password has been changed.
CRJAZ0124E The user name or password is invalid.
Check the log for details about the error at "C:\Users\QusaiAtoon\AppData\Local\jazz-scm". If you have configured custom logging check your log configuration settings for the path to the log file.
16:53:34 - Login failed. Trying again without quotes.
Logged in to https://clm.inspirejo.com:9443/ccm
16:53:38 - Get UUID of configured stream ApplicationA
Workspace (1037) "'C:\Users\QusaiAtoon\workspace70'" successfully created.
16:53:43 - Start (re)loading current workspace: lscm load -r https://clm.inspirejo.com:9443/ccm 'C:\Users\QusaiAtoon\workspace70' --force
Successfully loaded items into the sandbox.
16:53:48 - Load of workspace finished
16:53:48 - Push of branch master
Enumerating objects: 3, done.
Counting objects: 100% (3/3), done.
Writing objects: 100% (3/3), 256 bytes | 256.00 KiB/s, done.
Total 3 (delta 0), reused 0 (delta 0), pack-reused 0
To C:/Users/QusaiAtoon/MigrateHere2/migratedRepoD.git
 * [new branch]      master -> master
16:53:49 - Set new Flowtargets
Problem running 'set flowtarget':
The specified value for the --current option is not valid. Try 'lscm help set flowtarget' for more information.
16:53:50 - Warning - UseProvidedHistory is set to false, merge-conflicts are more likely to happen.
 For more information see https://github.com/rtcTo/rtc2git/wiki/Getting-your-History-Files
16:53:50 - Start collecting changeentries
Switched to a new branch 'ApplicationA'
16:53:51 - Start collecting changes since baseline creation
16:53:52 - Found no changes to accept
Successfully logged out of https://clm.inspirejo.com:9443/ccm/
16:53:52 -
All changes accepted - Migration of stream 'ApplicationA' is completed.
You can distribute the git-repo 'migratedRepoD.git'.

The output of the second Stream Migration:

refs/heads/ApplicationC
refs/heads/ApplicationC_branchpoint
16:57:04 - Found existing git repo in work directory, resuming migration...
Problem running 'login':
Could not log in to https://clm.inspirejo.com:9443/ccm as user 'baha': CRJAZ0124E The user name or password is invalid.Try logout and re-login with the updated credentials if the password has been changed.
CRJAZ0124E The user name or password is invalid.
Check the log for details about the error at "C:\Users\QusaiAtoon\AppData\Local\jazz-scm". If you have configured custom logging check your log configuration settings for the path to the log file.
16:57:07 - Login failed. Trying again without quotes.
Logged in to https://clm.inspirejo.com:9443/ccm
16:57:10 - Get UUID of configured stream ApplicationC
16:57:12 - Set core.ignorecase to false
Switched to a new branch 'ApplicationC'
16:57:12 - Start (re)loading current workspace: lscm load -r https://clm.inspirejo.com:9443/ccm 'C:\Users\QusaiAtoon\workspace69' --force
Problem running 'load':
Unmatched workspace "'C:\Users\QusaiAtoon\workspace69'"
16:57:13 - Load of workspace finished
16:57:14 - Set new Flowtargets
Problem running 'list flowtargets':
Unmatched workspace "'C:\Users\QusaiAtoon\workspace69'"
16:57:14 - Command 'lscm --show-uuid y --show-alias n list flowtargets -r https://clm.inspirejo.com:9443/ccm 'C:\Users\QusaiAtoon\workspace69'' returned non-zero exit status 25.
Problem running 'add flowtarget':
Unmatched workspace "'C:\Users\QusaiAtoon\workspace69'"
Problem running 'set flowtarget':
The specified value for the --current option is not valid. Try 'lscm help set flowtarget' for more information.
16:57:14 - Warning - UseProvidedHistory is set to false, merge-conflicts are more likely to happen.
 For more information see https://github.com/rtcTo/rtc2git/wiki/Getting-your-History-Files
16:57:14 - Start collecting changeentries
Already on 'ApplicationC'
16:57:14 - Start collecting changes since baseline creation
Problem running 'compare':
Unmatched workspace "'C:\Users\QusaiAtoon\workspace69'"
16:57:15 - Found no changes to accept
Successfully logged out of https://clm.inspirejo.com:9443/ccm/
16:57:16 -
All changes accepted - Migration of stream 'ApplicationC' is completed.
You can distribute the git-repo 'migratedRepoD.git'.

@Qusai3toon
Copy link
Author

@WtfJoke I hope that you respond because I am still stuck with this problem, and I realized That in the second branch (That contains the files of the first branch) has also the folders of the second branch(Which is good but they are empty).

Thanks for the help in advance.

@WtfJoke
Copy link
Member

WtfJoke commented Sep 30, 2021

Im currently in vacation 🌴 so I dont check github very often.

As often the logs tell already a lot. In case youre stuck they often help.

16:57:12 - Start (re)loading current workspace: lscm load -r https://clm.inspirejo.com:9443/ccm 'C:\Users\QusaiAtoon\workspace69' --force
Problem running 'load':
Unmatched workspace "'C:\Users\QusaiAtoon\workspace69'"

The workspace name seems to be a windows path in your case.
I think that logline shows your main problem, so I would suggest, make sure your workspace exist.

It probably also makes sense to change your workspace name to something more simple (eg. avoid special characters, except maybe - and _, so maybe workspace70 is enough in your case)

Another note

Problem running 'set flowtarget':
The specified value for the --current option is not valid. Try 'lscm help set flowtarget' for more information.

You might need to check that as well. Depending on your rtc (cli) version that command doesnt work (or just the --current flag), you might need to fix that. Which rtc version do you use? 5, 6 or another one? Default is: 5 (Option is called RTCVersion, beside 5, 6 is also supported)

In case you need to debug those commands, there is an option LogShellCommands , which displays all the executed commands.

Hope that helps to get unstuck 👍

@WtfJoke
Copy link
Member

WtfJoke commented Oct 5, 2021

@Qusai3toon were you able to continue and to resolve the issue?

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

2 participants