Repository navigation
Added
SVNPath: a read-only path in a Subversion repository served over HTTP by
mod_dav_svn, built onpathapi.httpalone.SVNPath("trunk/README", instance=URL, ref=None, username=None, password=None, token=None, backend=None): astat()is one
PROPFIND, a listing onePROPFINDwithDepth: 1whose children keep their stat,
refis a revision number read through the revision stub the server announces, the md5
and sha1 digests come with the stat (checksum(), without reading the file), and a link
is read withreadlink()and followed on its last name. Properties are asked for by
name: anallpropreply can be invalid XML.RepoPath(type="svn", instance=URL)returns
one;RepoPath.kinds()lists"svn".SourceForgePath("README", project="docutils", mount="code", ref=None, instance=None, backend=None): the Subversion tool of a SourceForge project, found through the site's
REST API once per backend. A Git or Mercurial tool isNotImplementedError, a missing
projectFileNotFoundError.RepoPath(type="sourceforge", project=...)returns one.- The schemes
svn+https:,svn+http:(SVNURIPath) andsourceforge:
(SourceForgeURIPath) inrepopath.uri, registered through theuripath.schemesentry
points like the others.svn:(svnserve) is not one of them. RepoBackend(auth=(user, password)), sent asAuthorization: Basic, and
allow_redirects=onRepoBackend.request().GiteaPath("src/mod.py", owner="acme", repo="widgets", ref=None, instance=None, token=None, backend=None): a read-only path in a repository on Gitea or Forgejo, through
the REST API athttps://<instance>/api/v1. The default instance and the only one detected
iscodeberg.org; any other needsRepoPath(type="gitea", instance=HOST), and"forgejo"
is another name of the kind. Directories are read through the Git Trees API in pages of
1,000 (the contents API answers a directory whole, 15 s for 2,000 entries), file bodies
with oneGETof therawroute; the server answers405toHEAD, so none is sent. A
symlink is a file that reads as its target, a submodule an empty directory, and a file in
Git LFS reads as the pointer Git holds, with the pointer's size. A private repository and
a missing one are bothFileNotFoundError; an unknown token isPermissionError.- The scheme
gitea:(GiteaURIPath,gitea://[TOKEN@]host/owner/repo/path?ref=REF) in
repopath.uri, declared in theuripath.schemesentry points like the others (runpip install -e .again after updating an editable checkout), andrepo://codeberg.org/...,
which detects the kind. The token in the user slot is hidden fromstr(),repr()and
every message, as forgithub:andgitlab:. ALIASES, a class attribute of a kind: other namestype=takes for it.RepoPath.kinds()
listsTYPEonly.
Changed
- The
uriextra requirespathapi-uri>=0.1.1,<0.2(it allowed>=0.1.0):
0.1.1 hides the userinfo of every scheme whose class marks it a secret, which the
repo:,github:,gitlab:andgitea:classes do, so a token is never shown in
str()orrepr()of aSource.pip install "repopath[uri]"upgrades it.
Full Changelog: v0.1.0...v0.1.1