From f619db022734dff6b988c514e3a292a5c7babaf0 Mon Sep 17 00:00:00 2001 From: Karen Arutyunov Date: Thu, 22 Feb 2018 15:02:15 +0300 Subject: Invent repository_state() function --- bpkg/manifest-utility.hxx | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'bpkg/manifest-utility.hxx') diff --git a/bpkg/manifest-utility.hxx b/bpkg/manifest-utility.hxx index f4dadb4..f672ba7 100644 --- a/bpkg/manifest-utility.hxx +++ b/bpkg/manifest-utility.hxx @@ -40,6 +40,19 @@ namespace bpkg // repository_location parse_location (const char*, optional); + + // Return the repository state subdirectory for the specified location as it + // appears under .bpkg/repositories/ in the bpkg configuration. Return empty + // directory if the repository type doesn't have any state. + // + // Note that the semantics used to produce this name is repository type- + // specific and can base on the repository canonical name or (potentially a + // subset of) the location URL. In particular, a state directory could be + // shared by multiple repository locations of the same type (@@ TODO: if we + // ever do this, then we will need to complicate the removal logic). + // + dir_path + repository_state (const repository_location&); } #endif // BPKG_MANIFEST_UTILITY_HXX -- cgit v1.1