Commit Graph

16 Commits

Author SHA1 Message Date
Eugene Vigdorchik d7f7a243e5 Handle the case of missing ~/.sbt/staging directory when asking for a source project dependency. 2012-06-02 19:03:38 -04:00
Mark Harrah 9bebc70ada normalize URI before hashing 2012-03-17 19:31:56 -04:00
Mark Harrah 14e18f2350 use writeable local builds directly 2012-02-13 22:02:44 -05:00
Sanjin Sehic 0de9b67073 Remove 2-stage cloning for git and mercurial resolvers 2012-02-13 22:02:44 -05:00
Sanjin Sehic 3514ad7039 Silence svn checkout output 2012-02-13 22:02:44 -05:00
Sanjin Sehic bcfe46c019 Track all remote branches in local git repository
This change fixes bug where non-HEAD branches could not be checked out
because the local copy of a remote git repository was not tracking
them.
2012-02-13 22:02:44 -05:00
Sanjin Sehic 43142ce3b4 Fix not cleaning up when checkout of a DVCS branch fails 2012-02-13 22:02:44 -05:00
Sanjin Sehic 5232dd941e Fix resolving SVN URI with revision 2012-02-13 22:02:44 -05:00
Sanjin Sehic 837d973fd3 Remove potentially unsafe optimization in local resolver
Old implementation of the local resolver did not copy directory if it
was writable. This optimization can lead to some potential problems if
the directory is writable, but its subdirectories aren't.

New implementation of the local resolver does not have this
optimization and it always copies the directory into staging area.
2012-02-13 22:02:44 -05:00
Sanjin Sehic 5ed012c7d9 Add another run method in Resolvers for commands with no working directory 2012-02-13 22:02:44 -05:00
Sanjin Sehic 7efa24f59b Inline trivial private methods 2012-02-13 22:02:44 -05:00
Sanjin Sehic e4f809953f Implement resolver for subversion repositories
All subversion URIs have to be prefixed with 'svn:' to separate them
from URIs for other resolvers. For example, 'svn:https://server/repo'
can now be used.
2012-02-13 22:02:44 -05:00
Sanjin Sehic bc4443b408 Implement resolver for mercurial repositories
All mercurial URIs have to be prefixed with 'hg:' to separate them
from URIs for other resolvers. For example,
'hg:https://server/user/repo' can now be used.
2012-02-13 22:02:44 -05:00
Sanjin Sehic 972acc871a Allow retrieving of non-standard git URIs
Non-standard git URIs are ones that do not start with 'git:' nor end
with '.git'. An example of non-standard git URI is
'ssh://server/home/user/repo'.

The mechanism for specifying a non-standard git URI is done by
prefixing the whole URI with 'git:' to signify that it should be
handled with the git resolver. For example, non-standard git URIs like
'git:ssh://server/user/repo' and 'git:https://server/user/repo' can
now be used.
2012-02-13 22:02:44 -05:00
Sanjin Sehic 77626f5232 Optimize retrieving from git repositories
Instead of cloning from a remote git repository for each branch,
revision or tag separately, the git resolver locally clones only once
the remote git repository and then creates further local clones from
this local copy of the remote repository.

First, optimization, of course, is execution speed, because cloning
local repository is much faster than remote repository. Furthermore,
because git uses hard-linking when a clone of local repository is
created, the second optimization is in space consumption.

For example, if we have one project that uses
https://github.com/harrah/xsbt.git#v0.11.1 and second project that
uses https://github.com/harrah/xsbt.git#v0.11.2, in previous git
resolver implementation it would require two separate clones of the
remote git repository at https://github.com/harrah/xsbt.git. But, the
new git resolver requires only one clone of the remote git repository
and two local clones which take no space because of hard-linking.
2012-02-13 22:02:44 -05:00
Sanjin Sehic 942427bfa3 Extract local, remote, and git BuildLoader.Resolver from ResolveUnit 2012-02-13 22:02:44 -05:00