Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(167)

Unified Diff: vpython/spec/spec.go

Issue 2699223002: vpython: Add CIPD support. (Closed)
Patch Set: comments, path => name Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « vpython/spec/load_test.go ('k') | vpython/spec/spec_test.go » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: vpython/spec/spec.go
diff --git a/vpython/spec/spec.go b/vpython/spec/spec.go
index 8fdc79e19a945fe05d67c9fe288c2a5ce7bd311e..8bc36ca90026a0e41f224c2d76509ff2bff173f4 100644
--- a/vpython/spec/spec.go
+++ b/vpython/spec/spec.go
@@ -26,9 +26,9 @@ func Normalize(spec *vpython.Spec) error {
// No duplicate packages. Since we're sorted, we can just check for no
// immediate repetitions.
for i, pkg := range spec.Wheel {
- if i > 0 && pkg.Path == spec.Wheel[i-1].Path {
+ if i > 0 && pkg.Name == spec.Wheel[i-1].Name {
return errors.Reason("duplicate spec entries for package %(path)q").
- D("path", pkg.Path).
+ D("name", pkg.Name).
Err()
}
}
@@ -54,7 +54,7 @@ func (s specPackageSlice) Swap(i, j int) { s[i], s[j] = s[j], s[i] }
func (s specPackageSlice) Less(i, j int) bool {
return sortby.Chain{
- func(i, j int) bool { return s[i].Path < s[j].Path },
+ func(i, j int) bool { return s[i].Name < s[j].Name },
func(i, j int) bool { return s[i].Version < s[j].Version },
}.Use(i, j)
}
« no previous file with comments | « vpython/spec/load_test.go ('k') | vpython/spec/spec_test.go » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698