mirror of
https://github.com/foo-dogsquared/wiki.git
synced 2025-01-31 04:58:21 +00:00
34 lines
10 KiB
HTML
34 lines
10 KiB
HTML
<!DOCTYPE html><html><head><meta name="viewport" content="width=device-width"/><meta charSet="utf-8"/><title>swh.fuse</title><script src="https://polyfill.io/v3/polyfill.min.js?features=es6"></script><script id="MathJax-script" async="" src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-chtml.js"></script><script type="text/x-mathjax-config">
|
|
MathJax = {
|
|
tex: {
|
|
inlineMath: [ ['$','$'], ['\(','\)'] ],
|
|
displayMath: [ ['$$','$$'], ['[',']'] ]
|
|
},
|
|
options = {
|
|
processHtmlClass = "math"
|
|
}
|
|
}
|
|
</script><meta name="next-head-count" content="6"/><link rel="preload" href="/wiki/_next/static/css/52fc2ba29703df73922c.css" as="style"/><link rel="stylesheet" href="/wiki/_next/static/css/52fc2ba29703df73922c.css" data-n-g=""/><noscript data-n-css=""></noscript><link rel="preload" href="/wiki/_next/static/chunks/main-ae4733327bd95c4ac325.js" as="script"/><link rel="preload" href="/wiki/_next/static/chunks/webpack-50bee04d1dc61f8adf5b.js" as="script"/><link rel="preload" href="/wiki/_next/static/chunks/framework.9d524150d48315f49e80.js" as="script"/><link rel="preload" href="/wiki/_next/static/chunks/commons.0e1c3f9aa780c2dfe9f0.js" as="script"/><link rel="preload" href="/wiki/_next/static/chunks/pages/_app-8e3d0c58a60ec788aa69.js" as="script"/><link rel="preload" href="/wiki/_next/static/chunks/940643274e605e7596ecea1f2ff8d83317a3fb76.4841a16762f602a59f00.js" as="script"/><link rel="preload" href="/wiki/_next/static/chunks/pages/%5B%5B...slug%5D%5D-1aa198f87ede1cd0e1dc.js" as="script"/></head><body><div id="__next"><main><h1>swh.fuse</h1><section class="post-metadata"><span>Date: <!-- -->2021-07-27 21:02:05 +08:00</span><span>Date modified: <!-- -->2021-07-28 00:00:24 +08:00</span></section><nav class="toc"><ol class="toc-level toc-level-1"></ol></nav><p>A tool to interact with the Software Heritage Filesystem (SwhFS);
|
|
you can see <a href="/wiki/literature.allanconSoftwareHeritageFilesystem2021">The Software Heritage Filesystem (SwhFS): Integrating Source Code Archival with Development</a> paper for an introduction.
|
|
</p><p>Some details about the tool itself...
|
|
</p><ul><li><p>It is mainly used with the <code class="inline-verbatim">swh fs</code> subcommand.
|
|
</p></li><li><p>To mount the filesystem itself, use <code class="inline-verbatim">swh fs mount DIRECTORY</code>.
|
|
</p></li></ul><p>When mounted, the directory should have the following structure:
|
|
</p><pre class="src-block"><code>swhfs
|
|
├── archive/
|
|
├── cache/
|
|
├── origin/
|
|
└── README
|
|
</code></pre><ul><li><p><code class="inline-verbatim">archive/</code> is the entry point for the archived repos in the library;
|
|
the files inside there cannot be listed (e.g., <code class="inline-verbatim">ls</code>, file managers)
|
|
but you can access the files inside of it (e.g., text editors, file openers)
|
|
</p></li><li><p><code class="inline-verbatim">cache/</code> contains on-disk representation of metadata
|
|
</p></li><li><p><code class="inline-verbatim">origin/</code> is where mounting of origins with an encoded URL
|
|
</p></li></ul><p>For up-to-date information, you can read the <code class="inline-verbatim">README</code> file.
|
|
</p><p>With the complete setup, you are now ready to interact with the filesystem.
|
|
The point of interest here is the <code class="inline-verbatim">archive/</code> directory which holds all of the objects in the merkle tree.
|
|
You can see the <a href="https://docs.softwareheritage.org/devel/swh-model/data-model.html#data-model">model data</a> from their documentation.
|
|
</p><p>You can interact with it by accessing one of the repo through their SWHID.
|
|
</p><pre class="src-block"><code class="language-shell">ls swhfs/archive/${SWHID}
|
|
</code></pre><p>The tool lazily loads the repo, saving bandwidth and disk space.
|
|
</p><section><h2>Backlinks</h2><ul><li><a href="/wiki/data.archives.software-heritage">Software Heritage</a></li></ul></section></main></div><script id="__NEXT_DATA__" type="application/json">{"props":{"pageProps":{"metadata":{"date":"2021-07-27 21:02:05 +08:00","date_modified":"2021-07-28 00:00:24 +08:00","language":"en","source":""},"title":"swh.fuse","hast":{"type":"root","children":[{"type":"element","tagName":"nav","properties":{"className":"toc"},"children":[{"type":"element","tagName":"ol","properties":{"className":"toc-level toc-level-1"},"children":[]}]},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"A tool to interact with the Software Heritage Filesystem (SwhFS);\nyou can see "},{"type":"element","tagName":"a","properties":{"href":"/literature.allanconSoftwareHeritageFilesystem2021"},"children":[{"type":"text","value":"The Software Heritage Filesystem (SwhFS): Integrating Source Code Archival with Development"}]},{"type":"text","value":" paper for an introduction.\n"}]},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"Some details about the tool itself...\n"}]},{"type":"element","tagName":"ul","properties":{},"children":[{"type":"element","tagName":"li","properties":{},"children":[{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"It is mainly used with the "},{"type":"element","tagName":"code","properties":{"className":["inline-verbatim"]},"children":[{"type":"text","value":"swh fs"}]},{"type":"text","value":" subcommand.\n"}]}]},{"type":"element","tagName":"li","properties":{},"children":[{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"To mount the filesystem itself, use "},{"type":"element","tagName":"code","properties":{"className":["inline-verbatim"]},"children":[{"type":"text","value":"swh fs mount DIRECTORY"}]},{"type":"text","value":".\n"}]}]}]},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"When mounted, the directory should have the following structure:\n"}]},{"type":"element","tagName":"pre","properties":{"className":["src-block"]},"children":[{"type":"element","tagName":"code","properties":{},"children":[{"type":"text","value":"swhfs\n├── archive/\n├── cache/\n├── origin/\n└── README\n"}]}]},{"type":"element","tagName":"ul","properties":{},"children":[{"type":"element","tagName":"li","properties":{},"children":[{"type":"element","tagName":"p","properties":{},"children":[{"type":"element","tagName":"code","properties":{"className":["inline-verbatim"]},"children":[{"type":"text","value":"archive/"}]},{"type":"text","value":" is the entry point for the archived repos in the library;\n the files inside there cannot be listed (e.g., "},{"type":"element","tagName":"code","properties":{"className":["inline-verbatim"]},"children":[{"type":"text","value":"ls"}]},{"type":"text","value":", file managers)\n but you can access the files inside of it (e.g., text editors, file openers)\n"}]}]},{"type":"element","tagName":"li","properties":{},"children":[{"type":"element","tagName":"p","properties":{},"children":[{"type":"element","tagName":"code","properties":{"className":["inline-verbatim"]},"children":[{"type":"text","value":"cache/"}]},{"type":"text","value":" contains on-disk representation of metadata\n"}]}]},{"type":"element","tagName":"li","properties":{},"children":[{"type":"element","tagName":"p","properties":{},"children":[{"type":"element","tagName":"code","properties":{"className":["inline-verbatim"]},"children":[{"type":"text","value":"origin/"}]},{"type":"text","value":" is where mounting of origins with an encoded URL\n"}]}]}]},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"For up-to-date information, you can read the "},{"type":"element","tagName":"code","properties":{"className":["inline-verbatim"]},"children":[{"type":"text","value":"README"}]},{"type":"text","value":" file.\n"}]},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"With the complete setup, you are now ready to interact with the filesystem.\nThe point of interest here is the "},{"type":"element","tagName":"code","properties":{"className":["inline-verbatim"]},"children":[{"type":"text","value":"archive/"}]},{"type":"text","value":" directory which holds all of the objects in the merkle tree.\nYou can see the "},{"type":"element","tagName":"a","properties":{"href":"https://docs.softwareheritage.org/devel/swh-model/data-model.html#data-model"},"children":[{"type":"text","value":"model data"}]},{"type":"text","value":" from their documentation.\n"}]},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"You can interact with it by accessing one of the repo through their SWHID.\n"}]},{"type":"element","tagName":"pre","properties":{"className":["src-block"]},"children":[{"type":"element","tagName":"code","properties":{"className":["language-shell"]},"children":[{"type":"text","value":"ls swhfs/archive/${SWHID}\n"}]}]},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"The tool lazily loads the repo, saving bandwidth and disk space.\n"}]}]},"backlinks":[{"path":"/data.archives.software-heritage","title":"Software Heritage"}]},"__N_SSG":true},"page":"/[[...slug]]","query":{"slug":["tools.swh-fuse"]},"buildId":"Ie9t5zutrXP6Of75Cb5xF","assetPrefix":"/wiki","nextExport":false,"isFallback":false,"gsp":true}</script><script nomodule="" src="/wiki/_next/static/chunks/polyfills-99d808df29361cf7ffb1.js"></script><script src="/wiki/_next/static/chunks/main-ae4733327bd95c4ac325.js" async=""></script><script src="/wiki/_next/static/chunks/webpack-50bee04d1dc61f8adf5b.js" async=""></script><script src="/wiki/_next/static/chunks/framework.9d524150d48315f49e80.js" async=""></script><script src="/wiki/_next/static/chunks/commons.0e1c3f9aa780c2dfe9f0.js" async=""></script><script src="/wiki/_next/static/chunks/pages/_app-8e3d0c58a60ec788aa69.js" async=""></script><script src="/wiki/_next/static/chunks/940643274e605e7596ecea1f2ff8d83317a3fb76.4841a16762f602a59f00.js" async=""></script><script src="/wiki/_next/static/chunks/pages/%5B%5B...slug%5D%5D-1aa198f87ede1cd0e1dc.js" async=""></script><script src="/wiki/_next/static/Ie9t5zutrXP6Of75Cb5xF/_buildManifest.js" async=""></script><script src="/wiki/_next/static/Ie9t5zutrXP6Of75Cb5xF/_ssgManifest.js" async=""></script></body></html> |