Граф коммитов

21 Коммитов

Автор SHA1 Сообщение Дата
Jordan Krage b9134b0aa4 gps: source cache: adding close() method to singleSourceCache, sourceGateway, and sourceCoordinator 2017-08-28 22:31:49 -05:00
Spencer Nelson 960d21a5fa Handle bazaar revisions by talking to the actual repo
String parsing was a little error prone, so we'd prefer to ask the
bazaar repository whether a particular string is a valid revision ID.
To do this, we need a very slightly custom version of
disambiguateRevision for *bzrSource.

This revision also refactors TestSourceManager_InferConstraint pretty
dramatically to let it work on repositories coming from different
VCSes.
2017-08-28 11:03:51 -04:00
Spencer Nelson 2d4b3c25d4 Correctly document (*SourceMgr).InferConstraint
The previous commit changed the order of prefernce when inferring
constraints. Also, moved the bazaar GUID parsing stuff to make sure
that it receives the same preference level as revisions for other
repository types.
2017-08-28 09:48:59 -04:00
Spencer Nelson 6977b26cec Move revision disambiguation into a private method
This just cleans up the SourceMgr implementation a bit.
2017-08-17 16:31:17 -04:00
Spencer Nelson e0f7e1f534 Remove heuristic git hash detection
Now that we are disambiguating revisions by going to the source, we
don't need the heuristic check of string length and hex parseability
anymore.
2017-08-17 16:28:48 -04:00
Spencer Nelson dfb871980f Change commitInfo to disambiguateRevision
commitInfo returned a struct from an external package. This coupling isn't
ideal, and we wouldn't use the extra info for anything. It's better to just have
a method for exactly what we want, which is disambiguation of short revision
specifiers.
2017-08-17 14:32:55 -04:00
Spencer Nelson 531fb9ce9b Parse abbreviated git revisions
While dep doesn't want to encourage the use of abbreviated git commit
identifiers, they come up frequently when we parse vendoring specifiers (like
glide.yaml) of existing projects. We should give a shot at parsing these and
then expanding them to their unabbreviated form.
2017-08-17 11:16:07 -04:00
Nathan Ollerenshaw 977e781246 Removed spurious comment.
Added spurious comment.
Modified logic to display warning initially, and then every 15 seconds, when lockfile busy.
2017-08-06 08:02:21 -07:00
Nathan Ollerenshaw 34fb454496 Added warning message to the lockfile waiting routine so that if we are
waiting for something, we at least print a message to stderr about it.

Hopefully will make situations like what is described in #947 obvious.
2017-08-04 22:00:45 -07:00
Carolyn Van Slyck ca54d471f5
Default empty constraints to any, not the default branch 2017-07-26 15:45:29 -05:00
Sebastian Dahlgren 167adc2b67 Support semver sufixes
This addresses an issue where the godep importer would confuse semver
suffixes for being bzr revisions.

Now we have stricter checks on the bzr revision checks which will be able to
distinguish between semver with a suffix and a bzr revision. The new check
enforces bzr revisions to contain an @ symbol.
2017-07-22 07:54:38 -05:00
Nathan Ollerenshaw 6bb33eedd3 Fixing comment nits for PR #853. 2017-07-19 21:24:21 -07:00
Nathan Ollerenshaw ea4aab1721 Fixed lockfile case where it was created already by the current process. We should not allow NewSourceManager to be called twice at the same time. 2017-07-19 07:37:14 -07:00
Nathan Ollerenshaw ca542d2667 Fix for #820
Fix nit around capital letter in error message.
2017-07-19 06:54:44 -07:00
Nathan Ollerenshaw 37f5988a64 Fix for #820 locking issues. 2017-07-18 23:55:00 -07:00
Carolyn Van Slyck c300e1cdb5
Interpret strings as branches > semver constraints
When a user supplied string in an imported config file, or specified to
dep ensure, can be interpreted multiple ways, prefer the branch over a
semver constraint.

In #710, glide.yaml specified v2 for https://github.com/go-mgo/mgo.
When we assume that is a semver constraint, solve fails because the
hinted revision in the lock (a commit on the v2 branch) doesn't satisfy
the assumed constraint of ^2.0.0.

The new preferred match order for the user string is:

* revision
* branch
* semver constraint
* tag

I am giving preference of a semver constraint over a tag so that a bare
version, 1.0.0, is interpreted more loosely with an implied caret,
^1.0.0, instead of the stricter exact match.
2017-07-06 18:29:03 -05:00
marwan-at-work 6f32508ff2 pr fixes 2017-07-06 11:49:11 -04:00
marwan-at-work 5bfa12ee00 move deduceConstraint to SourceManager 2017-07-06 11:28:04 -04:00
Jordan Krage 478afad8fe add new ProjectAnalyzerInfo type to return from ProjectAnalyzer.Info 2017-06-14 18:31:47 -05:00
sam boyer d5a4f854e4 Improve ProjectAnalyzer.DeriveManifestAndLock docs
Pursuant to discussion in #595.
2017-05-16 23:37:47 -04:00
Dave Cheney 9ea8489e5e gps: move gps to internal/gps
Fixes #300
Fixes #519
2017-05-10 14:15:27 +10:00