App-reposdb
view release on metacpan or search on metacpan
NAME
App::reposdb - Manipulate repos.db
VERSION
This document describes version 0.007 of App::reposdb (from Perl
distribution App-reposdb), released on 2020-10-10.
SYNOPSIS
See reposdb.
DESCRIPTION
"repos.db" is a SQLite database that lists repository names along with
some extra data. They have various uses, but my first use-case for this
is to store last commit/status/pull time (updated via a post-commit git
hook or "gitwrap"). This is useful to speed up like syncing of
repositories in "Git::Bunch" that wants to find out which of the
hundreds/thousand+ git repositories are "the most recently used" to
prioritize these repositories first. Using information from "repos.db"
is faster than having to "git status" or even stat() each repository.
FUNCTIONS
add_repo_tag
Usage:
add_repo_tag(%args) -> [status, msg, payload, meta]
Add a tag to a repo (by default the current repo).
This function is not exported.
Arguments ('*' denotes required arguments):
* repo => *str*
* reposdb_path* => *str*
* tags* => *array[str]*
Returns an enveloped result (an array).
First element (status) is an integer containing HTTP status code (200
means OK, 4xx caller error, 5xx function error). Second element (msg) is
a string containing error message, or 'OK' if status is 200. Third
element (payload) is optional, the actual result. Fourth element (meta)
is called result metadata and is optional, a hash that contains extra
information.
Return value: (any)
get_repo_metadata
Usage:
get_repo_metadata(%args) -> [status, msg, payload, meta]
Get metadata for a repo (by default the current repo).
This function is not exported.
Arguments ('*' denotes required arguments):
* repo => *str*
* reposdb_path* => *str*
Returns an enveloped result (an array).
First element (status) is an integer containing HTTP status code (200
means OK, 4xx caller error, 5xx function error). Second element (msg) is
a string containing error message, or 'OK' if status is 200. Third
element (payload) is optional, the actual result. Fourth element (meta)
is called result metadata and is optional, a hash that contains extra
information.
Return value: (any)
list_repos
Usage:
list_repos(%args) -> [status, msg, payload, meta]
( run in 2.481 seconds using v1.01-cache-2.11-cpan-8f98c5d2c55 )