aboutsummaryrefslogtreecommitdiff
path: root/bpkg/manifest-utility.hxx
diff options
context:
space:
mode:
authorKaren Arutyunov <karen@codesynthesis.com>2018-02-22 15:02:15 +0300
committerKaren Arutyunov <karen@codesynthesis.com>2018-02-22 17:27:41 +0300
commitf619db022734dff6b988c514e3a292a5c7babaf0 (patch)
tree73ab481eeb0ed524168e00f89d55dc2d3a91b9bd /bpkg/manifest-utility.hxx
parent6ec24eebcb42c0db205f9fff3f2716b84c6fcabf (diff)
Invent repository_state() function
Diffstat (limited to 'bpkg/manifest-utility.hxx')
-rw-r--r--bpkg/manifest-utility.hxx13
1 files changed, 13 insertions, 0 deletions
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<repository_type>);
+
+ // 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