Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
S
swh-fuse
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Antoine Lambert
swh-fuse
Commits
b81d0c98
Commit
b81d0c98
authored
3 years ago
by
vlorentz
Browse files
Options
Downloads
Patches
Plain Diff
Fix Sphinx warning cause by duplicate attribute definitions
parent
845b5d8c
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
swh/fuse/fs/artifact.py
+1
-16
1 addition, 16 deletions
swh/fuse/fs/artifact.py
swh/fuse/fs/entry.py
+5
-9
5 additions, 9 deletions
swh/fuse/fs/entry.py
with
6 additions
and
25 deletions
swh/fuse/fs/artifact.py
+
1
−
16
View file @
b81d0c98
...
...
@@ -30,10 +30,6 @@ SWHID_REGEXP = r"swh:1:(cnt|dir|rel|rev|snp):[0-9a-f]{40}"
class
Content
(
FuseFileEntry
):
"""
Software Heritage content artifact.
Attributes:
swhid: Software Heritage persistent identifier
prefetch: optional prefetched metadata used to set entry attributes
Content leaves (AKA blobs) are represented on disks as regular files,
containing the corresponding bytes, as archived.
...
...
@@ -44,6 +40,7 @@ class Content(FuseFileEntry):
swhid
:
CoreSWHID
prefetch
:
Any
=
None
"""
optional prefetched metadata used to set entry attributes
"""
async
def
get_content
(
self
)
->
bytes
:
data
=
await
self
.
fuse
.
get_blob
(
self
.
swhid
)
...
...
@@ -62,9 +59,6 @@ class Content(FuseFileEntry):
class
Directory
(
FuseDirEntry
):
"""
Software Heritage directory artifact.
Attributes:
swhid: Software Heritage persistent identifier
Directory nodes are represented as directories on the file-system,
containing one entry for each entry of the archived directory. Entry names
and other metadata, including permissions, will correspond to the archived
...
...
@@ -139,9 +133,6 @@ class Directory(FuseDirEntry):
class
Revision
(
FuseDirEntry
):
"""
Software Heritage revision artifact.
Attributes:
swhid: Software Heritage persistent identifier
Revision (AKA commit) nodes are represented on the file-system as
directories with the following entries:
...
...
@@ -432,9 +423,6 @@ class RevisionHistoryShardByPage(FuseDirEntry):
class
Release
(
FuseDirEntry
):
"""
Software Heritage release artifact.
Attributes:
swhid: Software Heritage persistent identifier
Release nodes are represented on the file-system as directories with the
following entries:
...
...
@@ -504,9 +492,6 @@ class ReleaseType(FuseFileEntry):
class
Snapshot
(
FuseDirEntry
):
"""
Software Heritage snapshot artifact.
Attributes:
swhid: Software Heritage persistent identifier
Snapshot nodes are represented on the file-system as recursive directories
following the branch names structure. For example, a branch named
``refs/tags/v1.0`` will be represented as a ``refs`` directory containing a
...
...
This diff is collapsed.
Click to expand it.
swh/fuse/fs/entry.py
+
5
−
9
View file @
b81d0c98
...
...
@@ -36,19 +36,17 @@ class EntryMode(IntEnum):
@dataclass
class
FuseEntry
:
"""
Main wrapper class to manipulate virtual FUSE entries
Attributes:
name: entry filename
mode: entry permission mode
fuse: internal reference to the main FUSE class
inode: unique integer identifying the entry
"""
name
:
str
"""
entry filename
"""
mode
:
int
"""
entry permission mode
"""
depth
:
int
fuse
:
Fuse
"""
internal reference to the main FUSE class
"""
inode
:
int
=
field
(
init
=
False
)
"""
unique integer identifying the entry
"""
file_info_attrs
:
Dict
[
str
,
Any
]
=
field
(
init
=
False
,
default_factory
=
dict
)
def
__post_init__
(
self
):
...
...
@@ -134,13 +132,11 @@ class FuseDirEntry(FuseEntry):
@dataclass
class
FuseSymlinkEntry
(
FuseEntry
):
"""
FUSE virtual symlink entry
Attributes:
target: path to symlink target
"""
mode
:
int
=
field
(
init
=
False
,
default
=
int
(
EntryMode
.
RDONLY_LNK
))
target
:
Union
[
str
,
bytes
,
Path
]
"""
path to symlink target
"""
async
def
size
(
self
)
->
int
:
return
len
(
str
(
self
.
target
))
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment