зеркало из https://github.com/golang/dep.git
Rename the lock field "repo" to "source"
This commit is contained in:
Родитель
55422bc13b
Коммит
6ae7723bf3
20
lock.go
20
lock.go
|
@ -28,12 +28,12 @@ type rawLock struct {
|
|||
}
|
||||
|
||||
type lockedDep struct {
|
||||
Name string `json:"name"`
|
||||
Version string `json:"version,omitempty"`
|
||||
Branch string `json:"branch,omitempty"`
|
||||
Revision string `json:"revision"`
|
||||
Repository string `json:"repo,omitempty"`
|
||||
Packages []string `json:"packages"`
|
||||
Name string `json:"name"`
|
||||
Version string `json:"version,omitempty"`
|
||||
Branch string `json:"branch,omitempty"`
|
||||
Revision string `json:"revision"`
|
||||
Source string `json:"source,omitempty"`
|
||||
Packages []string `json:"packages"`
|
||||
}
|
||||
|
||||
func readLock(r io.Reader) (*Lock, error) {
|
||||
|
@ -69,7 +69,7 @@ func readLock(r io.Reader) (*Lock, error) {
|
|||
|
||||
id := gps.ProjectIdentifier{
|
||||
ProjectRoot: gps.ProjectRoot(ld.Name),
|
||||
Source: ld.Repository,
|
||||
Source: ld.Source,
|
||||
}
|
||||
l.P[i] = gps.NewLockedProject(id, v, ld.Packages)
|
||||
}
|
||||
|
@ -96,9 +96,9 @@ func (l *Lock) MarshalJSON() ([]byte, error) {
|
|||
for k, lp := range l.P {
|
||||
id := lp.Ident()
|
||||
ld := lockedDep{
|
||||
Name: string(id.ProjectRoot),
|
||||
Repository: id.Source,
|
||||
Packages: lp.Packages(),
|
||||
Name: string(id.ProjectRoot),
|
||||
Source: id.Source,
|
||||
Packages: lp.Packages(),
|
||||
}
|
||||
|
||||
v := lp.Version()
|
||||
|
|
|
@ -35,7 +35,7 @@ func NewTestProjectContext(h *test.Helper, projectName string) *TestProjectConte
|
|||
h.Cd(pc.Project.AbsRoot)
|
||||
h.Setenv("GOPATH", pc.tempDir)
|
||||
|
||||
// Setup a Source Manager
|
||||
// Set up a Source Manager
|
||||
var err error
|
||||
pc.Context = &Ctx{GOPATH: pc.tempDir}
|
||||
pc.SourceManager, err = pc.Context.SourceManager()
|
||||
|
|
|
@ -21,7 +21,7 @@ Remove: [
|
|||
Modify: [
|
||||
{
|
||||
"name": "github.com/foo/bar",
|
||||
"repo": "+ http://github.example.com/foo/bar",
|
||||
"source": "+ http://github.example.com/foo/bar",
|
||||
"version": "+ 1.2.0",
|
||||
"branch": "- master",
|
||||
"revision": "f24338400f072ef18125ae0fbe6b06fe6d1783e7 -> 2a3a211e171803acb82d1d5d42ceb53228f51751",
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
"projects": [
|
||||
{
|
||||
"name": "github.com/foo/bar",
|
||||
"repo": "http://github.example.com/foo/bar",
|
||||
"source": "http://github.example.com/foo/bar",
|
||||
"version": "1.2.0",
|
||||
"revision": "2a3a211e171803acb82d1d5d42ceb53228f51751",
|
||||
"packages": [
|
||||
|
|
|
@ -112,7 +112,7 @@ func (diff *LockDiff) Format() (string, error) {
|
|||
// TODO(carolynvs) this should be moved to gps
|
||||
type LockedProjectDiff struct {
|
||||
Name gps.ProjectRoot `json:"name"`
|
||||
Source *StringDiff `json:"repo,omitempty"`
|
||||
Source *StringDiff `json:"source,omitempty"`
|
||||
Version *StringDiff `json:"version,omitempty"`
|
||||
Branch *StringDiff `json:"branch,omitempty"`
|
||||
Revision *StringDiff `json:"revision,omitempty"`
|
||||
|
|
Загрузка…
Ссылка в новой задаче