-
Notifications
You must be signed in to change notification settings - Fork 263
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
Initial import of existing repo and ITERATIVE mode usage question #265
Comments
Just in case - my current idea is to:
Can you please advise if it's the right way of doing the set-up ? Is there perhaps more efficient approach? |
One important thing about Copybara is that supports a single source of truth for a set of files (roots in glob). That means that the case you described above is not supported intentionally. You need to use CHANGE_REQUEST for one of the directions. It shoudl be the one importing "PRs". Note that despite not supporting gitlab/bitbucket, as long as the incoming pending change has a ref, you can use that ref. E.g.
copybara path/to/copy.bara.sky workflow refs/foo/bar/baz/1234 |
@mikelalcon thanks for the information regarding the intended use of copybara. I have checked and indeed Also can you please expected workflow with private repo as SoT? So we set-up ITERATIVE from private to public, right? If I understood it right - we should have another copybara But which branch should be used there ? E.g. shall we create |
We are currently migrating some existing repos to the new monorepo structure while keeping access to some of them accessible for the wider audience.
In order to keep all the git history of the individual "public" repo we have used "ITERATIVE" mode for initial migration to the "private" monorepo.
Afterwards we have set-up workflow with "ITERATIVE" mode for private->public (as advised in the #24 (comment) )
However since we use bitbucket and gitlab we can't use
CHANGE_REQUEST
mode - so our initial idea was to keep "ITERATIVE" mode for "public" -> "private" workflow (same as it was during the initial migration).And we have discovered an interesting behaviour:
The same time If we use "SQUASH" for "public" - > "private" workflow - then copybara is able to detect empty change with any number of commits.
interestingly enough, I have noticed, that if we enable
metadata.squash_notes()
and commit new change to "private" - these commits are actually also present in the "squash" commit details along with new change commit.May I possibly ask you for the intended use/set-up of copybara for the case when public repo should be "imported" at first to monorepo and repos are not github repos?
Perhaps I am missing something and copybara can use
GitOrigin-RevId
of the "public" commit once they are migrated back to "public" and just skip it ?The text was updated successfully, but these errors were encountered: