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

Fixes for issues #35 #48 #78

Merged
merged 8 commits into from
Nov 18, 2013
Merged

Fixes for issues #35 #48 #78

merged 8 commits into from
Nov 18, 2013

Conversation

cunei
Copy link

@cunei cunei commented Nov 18, 2013

Adding support for JGit, supporting Github's "pull/nnn/head" references for pull requests, and improving the resolution logic for git repositories, making it both more robust and faster.

Antonio Cunei added 8 commits November 18, 2013 17:14
We will later rename "Timeouts" to "Time", grouping there
all time-related utils
"Timeouts" is in project d-build, but that is not imported by
some places where timed() would be useful
By using refspecs in a different manner, it is no longer
necessary to manually adjust local refs to match possibly
changing remote refs: all is done by force during fetch.

Still experimenting with jgit at this time, although this
chane in logic makes the theoretical speed benefit of jgit
moot, and the absence of hard linking a significant
disadvantage.
This commit completely reorganizes the git support infrastructure,
making it considerably faster and adding optional jgit support.
The number of git invocations is now reduced, by using specially
crafted refspecs that allow "fetch" to replicate all of the
remote tags, branches, etc, in a single operation.

The references of the form "pull/nnn/head", for Github pull requests,
are now fully supported and involve no particular speed penalty
during regular use.

Support for jgit has also been added. Since jgit has no support for
hardlinking, however, additional copies of all clones will be
made, which is both slower and uses more disk space. Because of
this reason, jgit is not the default resolver for "git://" schemes.
It can be selected, however, just by specifying a URI of the form
"jgit://" in one or all the projects.

This commit closes #48, and closes #35.
The git resolver uses jgit, but jgit may also be used by sbt.
The support-default project is a dependency of the sbt plugin,
and jgit changed packages structure in a non-compatible way,
meaning that either sbt or the dbuild sbt plugin may be
left unable to find their correct jgit classes, after
Ivy completes its resolution and picks one of the two.

This commit moves jgit to a separate project, which does not
get included with the dbuild sbt plugin, thereby removing
the conflict.
@jsuereth
Copy link
Contributor

LGTM - Nice work here, especially the optimisations. Is there a noticiable speed difference between jgit/git we should document? I understand the file-copying concerns, but in my experience sometimes JGit lead to faster checkout/resolve times than Git.

jsuereth added a commit that referenced this pull request Nov 18, 2013
@jsuereth jsuereth merged commit 7fa5f1c into lightbend-labs:master Nov 18, 2013
@jsuereth jsuereth deleted the wip-issues-35-48 branch November 18, 2013 16:41
@cunei
Copy link
Author

cunei commented Nov 18, 2013

I've not benchmarked, but while testing I had the impression that they were essentially the same speed, at least in this scenario. I added a timer for this reason, and saw no large differences.

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

Successfully merging this pull request may close these issues.

2 participants