mirror of
git://git.yoctoproject.org/layerindex-web.git
synced 2025-07-19 20:59:01 +02:00
update.py: create dependency/maintainer records when creating LayerBranch
If we're creating a LayerBranch record, it's helpful to copy the maintainer and dependency records in from master as they're usually going to be the same; if they're not the user can always change them afterwards. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
This commit is contained in:
parent
0a1215e59e
commit
3cc0b78935
|
@ -334,6 +334,17 @@ def main():
|
|||
if layerbranch_master:
|
||||
layerbranch.vcs_subdir = layerbranch_master.vcs_subdir
|
||||
layerbranch.save()
|
||||
if layerbranch_master:
|
||||
for maintainer in layerbranch_master.layermaintainer_set.all():
|
||||
maintainer.pk = None
|
||||
maintainer.id = None
|
||||
maintainer.layerbranch = layerbranch
|
||||
maintainer.save()
|
||||
for dep in layerbranch_master.dependencies_set.all():
|
||||
dep.pk = None
|
||||
dep.id = None
|
||||
dep.layerbranch = layerbranch
|
||||
dep.save()
|
||||
|
||||
if layerbranch.vcs_subdir:
|
||||
# Find latest commit in subdirectory
|
||||
|
|
Loading…
Reference in New Issue
Block a user