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

106 Коммитов

Автор SHA1 Сообщение Дата
sam boyer 42e3d76d44
Merge pull request #1743 from twang2218/issue-1742-indexbyte
Fix issue 1742 by replacing '>' with '>='
2018-03-24 01:07:52 -04:00
Tobi Fuhrimann 5a7a4924d3 Fix typos 2018-03-14 08:24:05 +01:00
Tao Wang 7144ce2517
Fix issue 1742 by replacing '>' with '>='
Signed-off-by: Tao Wang <twang2218@gmail.com>
2018-03-09 00:07:47 +11:00
sam boyer 8c430ca3e7
Merge pull request #1707 from sigma/patch-1
typo: Fix method name in comment
2018-02-24 01:05:11 -05:00
sam boyer 338675da19
Merge pull request #1250 from jmank88/source_opt
gps: fine grained source transitions
2018-02-24 01:04:44 -05:00
Jordan Krage 98031fc3b0 gps: source: ping upstream when no local state exists 2018-02-22 08:53:19 -06:00
Yann Hodique 2ae3f31b14
typo: Fix method name in comment 2018-02-21 09:01:44 -08:00
sam boyer ec65c1160e
Merge pull request #1646 from jmank88/bench_panic
gps: BenchmarkCreateVendorTree - fatal error instead of nil panic
2018-02-21 10:33:08 -05:00
Evgeniy Kulikov 2f5dec17a7
fix review comments 2018-02-11 16:57:41 +03:00
Evgeniy Kulikov f518253944
[FIX] Cleanup code 2018-02-11 15:20:44 +03:00
Carolyn Van Slyck ca598e9995
Merge pull request #1645 from jmank88/own_maint
update CODEOWNERS and MAINTAINERS with more @jmank88
2018-02-08 08:16:28 -06:00
Jordan Krage a45e03b303
Merge pull request #1617 from jmank88/log_api
log.Logger api changes
2018-02-08 07:57:42 -06:00
Jordan Krage 93bcb36902
Merge pull request #1619 from jmank88/gps_doc
gps: improve documentation; add package doc
2018-02-08 07:57:10 -06:00
Jordan Krage 7400469680 gps: BenchmarkCreateVendorTree - fatal error instead of nil panic 2018-02-07 08:47:58 -06:00
Jordan Krage f3647e020b update CODEOWNERS and MAINTAINERS with more @jmank88 2018-02-07 08:21:32 -06:00
Shawn Smith e51c898c73
Fix typos 2018-02-05 15:53:08 +09:00
Jordan Krage c30c76bdee gps: doc WriteDepTree 2018-02-02 11:21:23 -06:00
Jordan Krage 892b68065d gps: improve documentation; add package doc 2018-02-02 10:11:14 -06:00
Jordan Krage e5ed562f5d log.Logger api changes
gps:
	-PruneProject: remove unused logger
	-WriteDepTree: swap logger for onWrite callback
	-fix example

dep:
	-SafeWriter.Write: nilable logger

cmd:
	-ensure/prune/init: react to changes
2018-02-02 09:31:05 -06:00
Jordan Krage b9a79adaa8 gps: vcs: fine grained source transitions
gps: source coord: set-up sources before returning gateways

gps: source cache: improve PackageTree ProjectRoot handling
2018-01-31 14:54:46 -06:00
sam boyer 18504a2d76 docs: Fix order in SortForUpgrade example 2018-01-28 01:00:59 -05:00
sam boyer 877b79325c prune: Remove spurious types, fix tests
All old types are now gone, tests are fixed, and test coverage should be
adequate for emergency purposes.
2018-01-24 16:04:02 -05:00
sam boyer 42ebf4a3d8 prune: Introduce CascadingPruneOptions
This new type defers computation of the actual prune value for a given
project until the method is called, rather than trying to precompute it.
By deferring computation, we retain full fidelity on the original
cascading inputs.

Still a WIP hack - need to clean up, and make everything actually use this.
2018-01-24 14:34:29 -05:00
sam boyer 0368da431f ensure: Absorb dep prune into dep ensure
This merge incorporates the long-running branch that consolidated all
the work related to absorbing dep prune into dep ensure. As of this
commit, dep prune is now a hidden dummy command, and dep ensure does all
the heavy lifting automatically.
2018-01-23 20:05:25 -05:00
Carolyn Van Slyck 7cb0a0cfc2
Import internal/test in all packages with tests
This allows people to run go test ./... -update, without this
in order to do a mass update of golden files you need to run the
update against individual packages which is a huge pain.
2018-01-18 15:14:51 -06:00
sam boyer 30ea01581f misc: Clean up CHANGELOG, add TODO from #1509 2018-01-15 21:38:49 -08:00
sam boyer 4437e02946
Merge pull request #1509 from sttts/sttts-source-urls
Rearrange path validation to allow ports
2018-01-15 21:27:16 -08:00
sam boyer db545146b1 gps: Disable certain bzr tests on Windows
The precise underlying causes of the problem with bzr on Windows is
unclear - it could be just about bzr with Windows, or the version of
bzr, or some underlying system interaction. But it's causing appveyor
tests to erroneously fail, and bzr is so little-used that it's
acceptable to just skip the tests, for now.
2018-01-15 08:01:41 -08:00
sam boyer 249a930709 Rearrange path validation to allow ports 2018-01-04 13:05:50 +01:00
sam boyer bf5b9fc8d8
Merge pull request #1219 from ibrasho-forks/optimize-gps-prune
gps: Refactor prune and filesystem functions
2017-12-18 13:44:55 -05:00
Ibrahim AshShohail cef261f120
gps: add tests for deleteEmptyDirs
Signed-off-by: Ibrahim AshShohail <ibra.sho@gmail.com>
2017-12-14 09:36:51 +03:00
Ibrahim AshShohail c7c3fd83f6
gps: fix a bug that kept empty dirs after pruning
Signed-off-by: Ibrahim AshShohail <ibra.sho@gmail.com>
2017-12-12 11:09:19 +03:00
Ibrahim AshShohail b4fca9bfce
gps: handle symlinks properly
We now delete anything that looks like a symlink if its called
"vendor" while pruning.

Hopefully, you didn't make a bad decision by relying on the magical
properties of symlinks.

Signed-off-by: Ibrahim AshShohail <ibra.sho@gmail.com>
2017-12-11 16:35:06 +03:00
Suhas Karanth 37d6c560cd do not create cachedir recursively
source
- main.go: Try to ensure directory for given `cachedir` path.
- context.go: Create the default cache directory, `$GOPATH/pkg/dep`, if the
  user did not override it.
- source_manager.go: Use `fs.EnsureDir` instead of `os.MkdirAll` for creating
  sources folder in cache directory.
- fs.go:
  - Add func `EnsureDir` to create a directory if it does not exist.
  - Remove func `IsValidPath`.

test
- integration_test.go: Improve tests for invalid cache directory.
- fs_test.go: Add test for `EnsureDir`, remove test for `IsValidPath`.
- manager_test.go: fix TestSourceManagerInit
  - Re-create cache directory before trying to call `NewSourceManager` the 2nd
    time and defer it's removal.
  - If `NewSourceManager` fails the 2nd time, exit the error using `t.Fatal` to
    avoid panic in `sm.Release`

misc
- language - {fallback => default} for cachedir
2017-12-08 09:02:18 +05:30
Suhas Karanth 6c1220894d allow cachedir override using env var
source
- main.go: Read and use env var `DEPCACHEDIR` for instantiating dep context.
- context.go:
  - Add field `Cachedir` to struct `Ctx`. This holds the value of env var
    `DEPCACHEDIR`.
  - Use `Ctx.Cachedir` while instantiating `gps.SourceMgr` if present, fallback
    to `$GOPATH/pkg/dep` otherwise.
- source_manager.go: Add a getter func `Cachedir` to facilitate testing in
  `context_test.go`.

test
- context_test.go Add test to check `gps.SourceMgr` is instantiated with
  appropriate `cachedir`.
- integration_test.go: Add test to check environment variable `DEPCACHEDIR` is
  loaded and used if present.

misc
- update changelog
2017-12-08 09:02:18 +05:30
sam boyer e4d57f7eda gps: Return output buffer bytes on error
This is crude, but it will restore output context to various git errors,
which has been crippling. We desperately need to work on formatting
these errors better.
2017-12-07 19:09:14 -05:00
Ibrahim AshShohail fb9ac8c17a
resolve nits
Signed-off-by: Ibrahim AshShohail <ibra.sho@gmail.com>
2017-12-07 23:49:59 +03:00
Ibrahim AshShohail e113a9be23
fix deriveFilesystemState bug on Windows junctions
Signed-off-by: Ibrahim AshShohail <ibra.sho@gmail.com>
2017-12-05 18:09:13 +03:00
Ibrahim AshShohail 148dfe560d
fix missing populated prune options
Signed-off-by: Ibrahim AshShohail <ibra.sho@gmail.com>
2017-12-05 18:09:07 +03:00
Ibrahim AshShohail 4b351b6b0e
rename TestStripVendorSymlinks to TestPruneVendorSymlinks
Signed-off-by: Ibrahim AshShohail <ibra.sho@gmail.com>
2017-12-05 17:04:11 +03:00
Ibrahim AshShohail a2a7418586
gps: update WriteDepTree to use PruneProject function
Signed-off-by: Ibrahim AshShohail <ibra.sho@gmail.com>
2017-11-29 10:21:56 +04:00
Ibrahim AshShohail 2a1be0fc06
gps: update prune functions to use filesystemState
Signed-off-by: Ibrahim AshShohail <ibra.sho@gmail.com>
2017-11-29 10:21:44 +04:00
Ibrahim AshShohail 869f2d711a
gps: refactor the filesystemState struct
Signed-off-by: Ibrahim AshShohail <ibra.sho@gmail.com>
2017-11-29 09:37:45 +04:00
sam boyer 13df556177
Merge pull request #1243 from carolynvs/gopkgin-v0-panic
gps: fix panic for gopkgin's implicit v0
2017-11-20 13:28:18 -05:00
Ibrahim AshShohail 7ed9049636
dep: update tests for adding prune to manifest
Signed-off-by: Ibrahim AshShohail <ibra.sho@gmail.com>
2017-11-17 10:25:07 +03:00
Ibrahim AshShohail 13aa6fcff1
dep: add prune options to manifests
Signed-off-by: Ibrahim AshShohail <ibra.sho@gmail.com>
2017-11-17 10:25:07 +03:00
sam boyer d0d6602eb1
Merge branch 'master' into gopkgin-v0-panic 2017-11-16 21:59:28 -05:00
sam boyer 91e47eed1f
Merge pull request #1245 from carolynvs/wrap-init-err
cmd/dep: wrap errors returned from init
2017-11-16 21:57:18 -05:00
Vladimir Smirnov b7882f0b43 Add a sanity check for git ls-remote output
This should fix panics for cases where `git ls-remote` contains
unepxected lines (e.x. some extra warnings from ssh)

Related to #1379
2017-11-16 16:52:52 +01:00
sam boyer 2b7a08040e
Merge pull request #1376 from sdboyer/dotgit-file
gps: Insulate against .git as file
2017-11-15 00:42:20 -05:00