Merge "v.io/jiri: remove support for old style profiles"
diff --git a/project/project.go b/project/project.go
index 8b97da0..18c8cd1 100644
--- a/project/project.go
+++ b/project/project.go
@@ -1233,7 +1233,7 @@
// function does not perform any version control operation on the master
// branch.
func buildToolsFromMaster(jirix *jiri.X, projects Projects, tools Tools, outputDir string) error {
- toolsToBuild, toolProjects := Tools{}, Projects{}
+ toolsToBuild := Tools{}
toolNames := []string{} // Used for logging purposes.
for _, tool := range tools {
// Skip tools with no package specified. Besides increasing
@@ -1243,17 +1243,12 @@
if tool.Package == "" {
continue
}
- project, err := projects.FindUnique(tool.Project)
- if err != nil {
- return err
- }
- toolProjects[project.Key()] = project
toolsToBuild[tool.Name] = tool
toolNames = append(toolNames, tool.Name)
}
updateFn := func() error {
- return ApplyToLocalMaster(jirix, toolProjects, func() error {
+ return ApplyToLocalMaster(jirix, projects, func() error {
return BuildTools(jirix, projects, toolsToBuild, outputDir)
})
}
@@ -1647,7 +1642,7 @@
// Old-style named imports handled in loop below.
continue
}
- nextRoot, nextFile := filepath.Join(root, remote.Root), ""
+ nextRoot := filepath.Join(root, remote.Root)
key := remote.ProjectKey()
p, ok := ld.localProjects[key]
if !ok {
@@ -1673,14 +1668,12 @@
}
ld.localProjects[key] = p
}
- // Reset the project to its specified branch and load the next file. Note
- // that we call load() recursively, so multiple files may be loaded by
- // resetAndLoad.
- if strings.HasPrefix(p.Path, ld.TmpDir) {
- nextFile = filepath.Join(p.Path, remote.Manifest)
- } else {
- nextFile = filepath.Join(jirix.Root, nextRoot, p.Path, remote.Manifest)
- }
+ // Reset the project to its specified branch and load the next file.
+ // Note that we call load() recursively, so multiple files may be
+ // loaded by resetAndLoad.
+ p.Revision = "HEAD"
+ p.RemoteBranch = remote.RemoteBranch
+ nextFile := filepath.Join(p.Path, remote.Manifest)
if err := ld.resetAndLoad(jirix, nextRoot, nextFile, remote.cycleKey(), p); err != nil {
return err
}