diff --git a/swh/loader/package/loader.py b/swh/loader/package/loader.py --- a/swh/loader/package/loader.py +++ b/swh/loader/package/loader.py @@ -210,6 +210,13 @@ uncompress(a_path, dest=uncompressed_path) return uncompressed_path + def extra_branches(self) -> Dict[bytes, Mapping[str, Any]]: + """Return an extra dict of branches that are used to update the set of + branches. + + """ + return {} + def load(self) -> Dict: """Load for a specific origin the associated contents. @@ -319,6 +326,13 @@ 'target': target, } + for name, target in self.extra_branches().items(): + if name in branches: + logger.error("Extra branch '%s' has been ignored", + name) + else: + branches[name] = target + snapshot_data = { 'branches': branches }