Skip to contents

What a project holds, at HEAD or at a given version. This is how a caller learns the path to pass to rfp_mergin_file_get() - the .qgs is named after the project by convention, but a convention is not a guarantee.

Usage

rfp_mergin_files(project, version = NULL)

Arguments

project

Character. namespace/project.

version

Character. "vN", or NULL (default) for HEAD.

Value

Tibble with columns path, size (bytes), checksum and mtime (POSIXct, UTC). The version actually read is attached as the version attribute, since NULL resolves server-side.

Reading at a pinned version

Any version, not just HEAD (#265). That is what makes a rebuild reproducible rather than dependent on when it ran: a consumer holding a committed list of (project, version) pins gets the same answer next season, after the project has moved on. Every non-HEAD read used to fail with HTTP 404.

A version is "vN" or NULL, and nothing else - "" in particular is refused. It looks harmless and is the shape a blank cell in a pin list takes, and the mergin client tests the version with if version: before sending it, so an empty string never reaches the server and HEAD comes back wearing the pin's label. Zero padding is fine: the server reads "v018" as "v18", and the version attribute reports what it actually resolved.

Examples

if (FALSE) { # \dontrun{
files <- rfp_mergin_files("newgraph/hornby_2026")
files[grepl("\\.qgs$", files$path), ]
attr(files, "version")

# Read a project as it stood at a pinned version, not as it stands now.
old <- rfp_mergin_files("newgraph/hornby_2026", version = "v10")
nrow(old)
} # }