commit | 90d83d9d602c2b358449f5d787b91dea52a29111 | [log] [tgz] |
---|---|---|
author | Nicolas Lacasse <nlacasse@google.com> | Wed Dec 09 10:27:04 2015 -0800 |
committer | Nicolas Lacasse <nlacasse@google.com> | Wed Dec 09 10:27:04 2015 -0800 |
tree | 9778bf709ec981f9d91731f6749ab4d4a1f12b7f | |
parent | c928f7fbc1b0988de1600e28ac3f54b4212b7904 [diff] |
TBR: Use unique keys and not project names to determine equality. Jiri used to assume that project names were unique. Once we implement importing remote manifests, that assumption becomes hard to enforce. This CL adds a Key() method to projects which returns a new ProjectKey type. The key is currently a combination of the project's name and remote, although this is easy to change in the future. The Projects map is now a map[ProjectKey]Project. There is still a lot of code that tries to lookup projects by their name. For instance: * tools and hooks in the manifest both refer to their projects by name * some command-line tools take a list of project names as arguments To support these cases, I added two methods to Projects map: * FindName, which returns all projects matching the name, and * FindUnique, which returns a single project matching the name, or an error if none or many are found. NOTE: This is *almost* the same CL as https://vanadium-review.googlesource.com/#/c/18205/. The only difference is that we now call writeMetadata() inside nullOperation.Run(). We need to do this to make sure the remotes in the metadata file are always in sync with the remotes in the manifest, otherwise the project keys will differ. MultiPart: 1/2 Change-Id: I334ffed799e8900b01865da2211b2de4cd04e9bf
“Jiri integrates repositories intelligently”
This repository implements the Jiri repository management tool.
For documentation, see http://godoc.org/v.io/jiri