forked from importers/git-importer
Don't crash on packages without merges ever (very few packages)
This commit is contained in:
parent
ab8120ca53
commit
c94d13d74e
@ -175,6 +175,10 @@ class TreeBuilder:
|
||||
merge_before_last = last_merge
|
||||
last_merge = factory_node
|
||||
factory_node = factory_node.parent
|
||||
|
||||
# a package without requests
|
||||
if not last_merge:
|
||||
return
|
||||
if merge_before_last:
|
||||
# we need to find the last merged_into that didn't end nowhere
|
||||
# and cut the rope there
|
||||
|
8120
tests/fixtures/000update-repos-data.yaml
vendored
Normal file
8120
tests/fixtures/000update-repos-data.yaml
vendored
Normal file
File diff suppressed because it is too large
Load Diff
12
tests/fixtures/000update-repos-expected-tree.yaml
vendored
Normal file
12
tests/fixtures/000update-repos-expected-tree.yaml
vendored
Normal file
@ -0,0 +1,12 @@
|
||||
- commit: openSUSE:Factory/000update-repos/12.0
|
||||
- commit: openSUSE:Factory/000update-repos/11.0
|
||||
- commit: openSUSE:Factory/000update-repos/10.0
|
||||
- commit: openSUSE:Factory/000update-repos/9.0
|
||||
- commit: openSUSE:Factory/000update-repos/8.0
|
||||
- commit: openSUSE:Factory/000update-repos/7.0
|
||||
- commit: openSUSE:Factory/000update-repos/6.0
|
||||
- commit: openSUSE:Factory/000update-repos/5.0
|
||||
- commit: openSUSE:Factory/000update-repos/4.0
|
||||
- commit: openSUSE:Factory/000update-repos/3.0
|
||||
- commit: openSUSE:Factory/000update-repos/2.0
|
||||
- commit: openSUSE:Factory/000update-repos/1.0
|
@ -48,6 +48,9 @@ class TestTreeMethods(unittest.TestCase):
|
||||
def test_corefreq_tree(self):
|
||||
self.verify_package("CoreFreq")
|
||||
|
||||
def test_000update_repos_tree(self):
|
||||
self.verify_package("000update-repos")
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
unittest.main()
|
||||
|
Loading…
Reference in New Issue
Block a user