Support perforce as an origin and destination#347
Open
dijit wants to merge 6 commits into
Open
Conversation
Author
|
I'm going to guess that import/copybara fails because of the new include
Sorry, it's not an error I can clear. |
Author
|
I had to enable LFS support in my project for this, is there any reason why fused off? It seems to function perfectly fine after adding the parameter... ~/projects/external/copybara; git diff
diff --git a/java/com/google/copybara/git/GitModule.java b/java/com/google/copybara/git/GitModule.java
index b23aaea2..2cd6caac 100644
--- a/java/com/google/copybara/git/GitModule.java
+++ b/java/com/google/copybara/git/GitModule.java
@@ -335,7 +335,13 @@ public class GitModule implements LabelsAwareModule, StarlarkValue {
positional = false,
doc =
"(Experimental) The repo id of the git repository, used as a stable reference to"
- + " the repo for validation.")
+ + " the repo for validation."),
+ @Param(
+ name = "enable_lfs",
+ defaultValue = "False",
+ named = true,
+ positional = false,
+ doc = "If true, Large File Storage support is enabled for the origin.")
},
useStarlarkThread = true)
@UsesFlags(GitOriginOptions.class)
@@ -353,6 +359,7 @@ public class GitModule implements LabelsAwareModule, StarlarkValue {
Boolean primaryBranchMigration,
@Nullable Object credentials,
@Nullable Object repoId,
+ Boolean enableLfs,
StarlarkThread thread)
throws EvalException {
checkNotEmpty(url, "url");
@@ -395,7 +402,7 @@ public class GitModule implements LabelsAwareModule, StarlarkValue {
? githubPostSubmitApprovalsProvider(
fixedUrl, SkylarkUtil.convertOptionalString(ref), credentialHandler)
: approvalsProvider(url),
- /* enableLfs= */ false,
+ enableLfs,
credentialHandler,
/* gitRepositoryHook= */ gitRepositoryHook);
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
There's a lot of warts with this currently, this is the patch we're using at Red Notice to sync our git/gerrit repos with our game depots in perforce.
Therefore it's built for specifically our needs;
Still missing to be production ready:If you want me to keep working on this patch I will, it'd be better to have the work upstreamed for me instead of constantly rebasing.I had to make some minor edits to MODULE.bazel to include p4java (instead of shelling out to a p4 binary)
I also changed the copyrights from our Red Notice ones to be Google ones.
Let me know if I should proceed with the finishing touches or not. We're happy to continue with the patch as-is of course.EDIT: I think we're effectively done with what's needed to make it production ready for most people.