Rename slothfs-multifs to slothfs-repofs.
This prepares for a different 'multi' file system surfacing multiple
separate git repostories.
Change-Id: I5a1f62efffe5b0dceca5093c9f2af4e9d6f3fbda
diff --git a/README.md b/README.md
index 3c07b0d..b02f51a 100644
--- a/README.md
+++ b/README.md
@@ -9,9 +9,9 @@
To start the file system:
- go install github.com/google/slothfs/cmd/slothfs-multifs
+ go install github.com/google/slothfs/cmd/slothfs-repofs
mkdir /tmp/mnt
- slothfs-multifs /tmp/mnt &
+ slothfs-repofs /tmp/mnt &
To create a workspace "ws" corresponding to the latest manifest version
diff --git a/all.bash b/all.bash
index 842095f..c17f4e3 100644
--- a/all.bash
+++ b/all.bash
@@ -21,7 +21,7 @@
fs \
populate \
cmd/slothfs-deref-manifest \
-cmd/slothfs-multifs \
+cmd/slothfs-repofs \
cmd/slothfs-manifestfs \
cmd/slothfs-populate \
cmd/slothfs-gitilesfs \
diff --git a/cmd/slothfs-populate/main.go b/cmd/slothfs-populate/main.go
index ce50744..476a1be 100644
--- a/cmd/slothfs-populate/main.go
+++ b/cmd/slothfs-populate/main.go
@@ -92,7 +92,7 @@
func main() {
gitilesOptions := gitiles.DefineFlags()
- newROWorkspace := flag.String("ro", "", "Set path to slothfs-multifs mount.")
+ newROWorkspace := flag.String("ro", "", "Set path to slothfs-repofs mount.")
mount := flag.String("mount", "", "Set slothfs mountpoint for -sync option. Autodetected if empty.")
sync := flag.Bool("sync", false, "Sync checkout to latest manifest version.")
syncBranch := flag.String("sync_branch", "master", "Use this branch for -sync.")
diff --git a/cmd/slothfs-multifs/main.go b/cmd/slothfs-repofs/main.go
similarity index 96%
rename from cmd/slothfs-multifs/main.go
rename to cmd/slothfs-repofs/main.go
index 8701ba9..dcb8e45 100644
--- a/cmd/slothfs-multifs/main.go
+++ b/cmd/slothfs-repofs/main.go
@@ -58,7 +58,7 @@
log.Printf("NewService: %v", err)
}
- opts := fs.MultiFSOptions{}
+ opts := fs.MultiManifestFSOptions{}
if *config != "" {
cloneJS := filepath.Join(*config, "clone.json")
configContents, err := ioutil.ReadFile(cloneJS)
@@ -76,7 +76,7 @@
}
}
- root := fs.NewMultiFS(service, cache, opts)
+ root := fs.NewMultiManifestFS(service, cache, opts)
nodeFSOpts := &nodefs.Options{
EntryTimeout: time.Hour,
NegativeTimeout: time.Hour,
diff --git a/docs/manual.md b/docs/manual.md
index 4c1f17e..de587af 100644
--- a/docs/manual.md
+++ b/docs/manual.md
@@ -22,7 +22,7 @@
Get the source code,
- go get github.com/google/slothfs/cmd/slothfs-multifs
+ go get github.com/google/slothfs/cmd/slothfs-repofs
SlothFS depends git2go, which depends on libgit2. For git2go, we recommend
compiling libgit2 in statically, as documented
@@ -60,7 +60,7 @@
Then, to mount the file system, run
- slothfs-multifs /slothfs
+ slothfs-repofs /slothfs
Dereferencing a manifest
diff --git a/fs/api.go b/fs/api.go
index fd860ba..c1ba8e8 100644
--- a/fs/api.go
+++ b/fs/api.go
@@ -47,11 +47,16 @@
FileCloneOption []CloneOption
}
-// MultiFSOptions holds options for a file system with multiple manifests.
-type MultiFSOptions struct {
+// MultiManifestFSOptions holds options for a file system with multiple manifests.
+type MultiManifestFSOptions struct {
// ManifestDir stores configured manifest files.
ManifestDir string
+ MultiFSOptions
+}
+
+// MultiFSOptions holds cloning options for a set of Git repos.
+type MultiFSOptions struct {
// RepoCloneOption matches against the Path field of the
// repository within a manifest.
RepoCloneOption []CloneOption
diff --git a/fs/manifestfs_test.go b/fs/manifestfs_test.go
index 6a2f41d..4f0822b 100644
--- a/fs/manifestfs_test.go
+++ b/fs/manifestfs_test.go
@@ -273,7 +273,7 @@
}
func newTestFixture() (*testFixture, error) {
- d, err := ioutil.TempDir("", "multifstest")
+ d, err := ioutil.TempDir("", "slothfs")
if err != nil {
return nil, err
}
@@ -327,7 +327,7 @@
return nil
}
-func TestMultiFSBrokenXML(t *testing.T) {
+func TestMultiManifestFSBrokenXML(t *testing.T) {
fix, err := newTestFixture()
if err != nil {
t.Fatalf("newTestFixture: %v", err)
@@ -339,8 +339,8 @@
t.Errorf("WriteFile(%s): %v", brokenXMLFile, err)
}
- opts := MultiFSOptions{}
- fs := NewMultiFS(fix.service, fix.cache, opts)
+ opts := MultiManifestFSOptions{}
+ fs := NewMultiManifestFS(fix.service, fix.cache, opts)
if err := fix.mount(fs); err != nil {
t.Fatalf("mount: %v", err)
@@ -351,7 +351,7 @@
}
}
-func TestMultiFSBasic(t *testing.T) {
+func TestMultiManifestFSBasic(t *testing.T) {
fix, err := newTestFixture()
if err != nil {
t.Fatalf("newTestFixture: %v", err)
@@ -363,8 +363,8 @@
t.Errorf("WriteFile(%s): %v", xmlFile, err)
}
- opts := MultiFSOptions{}
- fs := NewMultiFS(fix.service, fix.cache, opts)
+ opts := MultiManifestFSOptions{}
+ fs := NewMultiManifestFS(fix.service, fix.cache, opts)
if err := fix.mount(fs); err != nil {
t.Fatalf("mount: %v", err)
@@ -410,7 +410,7 @@
}
}
-func TestMultiFSManifestDir(t *testing.T) {
+func TestMultiManifestFSManifestDir(t *testing.T) {
fix, err := newTestFixture()
if err != nil {
t.Fatalf("newTestFixture: %v", err)
@@ -427,10 +427,10 @@
t.Errorf("WriteFile(%s): %v", xmlFile, err)
}
- opts := MultiFSOptions{
+ opts := MultiManifestFSOptions{
ManifestDir: mfDir,
}
- fs := NewMultiFS(fix.service, fix.cache, opts)
+ fs := NewMultiManifestFS(fix.service, fix.cache, opts)
if err := fix.mount(fs); err != nil {
t.Fatalf("mount: %v", err)
diff --git a/fs/multifs.go b/fs/multimanifestfs.go
similarity index 96%
rename from fs/multifs.go
rename to fs/multimanifestfs.go
index 9978390..f9fa084 100644
--- a/fs/multifs.go
+++ b/fs/multimanifestfs.go
@@ -34,7 +34,7 @@
nodeCache *nodeCache
cache *cache.Cache
fsConn *nodefs.FileSystemConnector
- options MultiFSOptions
+ options MultiManifestFSOptions
gitiles *gitiles.Service
}
@@ -89,7 +89,7 @@
func (c *configNode) Deletable() bool { return false }
-func NewMultiFS(service *gitiles.Service, c *cache.Cache, options MultiFSOptions) *multiManifestFSRoot {
+func NewMultiManifestFS(service *gitiles.Service, c *cache.Cache, options MultiManifestFSOptions) *multiManifestFSRoot {
r := &multiManifestFSRoot{
Node: nodefs.NewDefaultNode(),
nodeCache: newNodeCache(),
diff --git a/populate/e2e_test.go b/populate/e2e_test.go
index 5ced2a3..505c3fb 100644
--- a/populate/e2e_test.go
+++ b/populate/e2e_test.go
@@ -1,3 +1,17 @@
+// Copyright 2016 Google Inc. All rights reserved.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
package populate
import (
@@ -122,9 +136,9 @@
log.Printf("NewService: %v", err)
}
- opts := fs.MultiFSOptions{}
+ opts := fs.MultiManifestFSOptions{}
- root := fs.NewMultiFS(service, fix.cache, opts)
+ root := fs.NewMultiManifestFS(service, fix.cache, opts)
fuseOpts := nodefs.NewOptions()
fix.fsServer, _, err = nodefs.MountRoot(filepath.Join(dir, "mnt"), root, fuseOpts)
if err != nil {