Skip to content

Commit

Permalink
Transforming LocalRepoFinder and QbtRemote classes.
Browse files Browse the repository at this point in the history
These classes allow the user to map a repo to a different name locally on disk
and on the server, allowing those places to use names which contain otherwise
invalid characters for repo names.

Resolves TerabyteQbt#5 and mitigates TerabyteQbt#4.

QbtConfig might look like this:

Function<String, String> transformNames = new Function<String, String>() {
    public String apply(String name) {
        return name.replace("flume_ng", "flume-ng").replace("hadoop_lzo", "hadoop-lzo");
    }
}

return new QbtConfig(
    new TransformingFormatLocalRepoFinder(gitLocalVcs, transformNames, workspaceRoot.toString()),
    // ...
    new MapQbtRemoteFinder([
        formatremote: new TransformingFormatQbtRemote(
            gitRemoteVcs,
            transformNames,
            "ssh://git@github.mtv.cloudera.com/TerabyteQbt/%r.git",
        ),
        githubremote: new TransformingGithubQbtRemote(
            gitRemoteVcs,
            transformNames,
            githubToken,
            "TerabyteQbt",
            "%r",
        ),
    ]),
    // ...
);
  • Loading branch information
terabyte committed Mar 1, 2018
1 parent f4b1885 commit 6b177a8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion qbt-manifest
Original file line number Diff line number Diff line change
Expand Up @@ -2206,7 +2206,7 @@
}
}
},
"version": "6b09307ffd7af1eb7810d595108de34e502e512c"
"version": "3be9efbdbdbc4d851cbf05e7b92f1295cdf08952"
},
"wrapper_generator": {
"packages": {
Expand Down

0 comments on commit 6b177a8

Please sign in to comment.