commit | 9ee826dee6d2333f5a5cbeefa55f6a9983eca234 | [log] [tgz] |
---|---|---|
author | Han-Wen Nienhuys <hanwen@google.com> | Wed Jul 13 18:48:01 2016 +0200 |
committer | Han-Wen Nienhuys <hanwen@google.com> | Wed Jul 13 18:49:04 2016 +0200 |
tree | c69938a41ae9ab92572eb95702858ac3873f1611 | |
parent | 8b96081a0f91774ef46b14109ed37d43b2a52fa8 [diff] |
Speed up slothfs-expand-manifest. Use &b=BRANCHNAME to fetch all revisions in a single Gitiles call. It now completes in a couple of seconds. Change-Id: I933997275286a1fcaaa43c1ca9bd656d4db9ea7d
This is a FUSE filesystem that provides light-weight, lazily downloaded, read-only checkouts of Git repositories. It is intended for use with Android.
To start the file system:
go install github.com/google/slothfs/cmd/slothfs-multifs mkdir /tmp/mnt slothfs-multifs -gitiles https://android.googlesource.com/ /tmp/mnt &
To create a workspace “ws” corresponding to the latest manifest version
go install github.com/google/slothfs/cmd/slothfs-expand-manifest slothfs-expand-manifest --gitiles https://android.googlesource.com/ \ > /tmp/m.xml && ln -s /tmp/m.xml /tmp/mnt/config/ws
To populate a checkout
go install github.com/google/slothfs/cmd/slothfs-populate mkdir -p checkout/frameworks cd checkout/frameworks git clone https://android.googlesource.com/platform/frameworks/base cd ../ slothfs-populate -ro /tmp/mnt/ws .
The filesystem daemon uses an on-disk cache, which by default is stored under ~/.cache/slothfs
The FUSE file system clones repositories on-demand. You can avoid cloning altogether for repositories you know you don't need. This is configured through a JSON file.
For example, if you work on Android, and build on a Linux machine, you will never need the Darwin related prebuilts. You can avoid a costly clone for those by doing:
{"Repo": ".*darwin.*", "Clone": false}
Similarly, the build system system will read files (typically called ‘*.mk’) across the entire tree. When any .mk file is opened, this should not trigger a clone. This is achieved with the following entry
{"File": ".*mk$", "Clone": false}
Together, the following config.json
file is a good start for working on android:
[{"Repo": ".*darwin.*", "Clone": false}, {"File": ".*mk$", "Clone": false}]
A more elaborate configuration file is included as android.json
.
This is not an official Google product.