Skip to content

Commit

Permalink
[migration-tools] Handle repositories with no release entry. (ros#25476)
Browse files Browse the repository at this point in the history
Earlier versions of foxy did not have any repositories without release
entries. This covers that case by:
* Copying all repositories entries, even those that lack release entries.
* Only attempting to bloom repositories which have release entries.
  • Loading branch information
nuclearsandwich authored Jun 16, 2020
1 parent 9810319 commit 0cf9944
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions migration-tools/migrate-rosdistro.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,13 +80,15 @@ def write_tracks_file(tracks, commit_msg=None):
repositories_to_retry = []
for repo_name, repo_data in sorted(source_distribution.repositories.items()):
if repo_name not in dest_distribution.repositories:
new_repositories.append(repo_name)
dest_repo_data = copy.deepcopy(repo_data)
release_tag = dest_repo_data.release_repository.tags['release']
release_tag = release_tag.replace(args.source,args.dest)
dest_repo_data.release_repository.tags['release'] = release_tag
if dest_repo_data.release_repository:
new_repositories.append(repo_name)
release_tag = dest_repo_data.release_repository.tags['release']
release_tag = release_tag.replace(args.source,args.dest)
dest_repo_data.release_repository.tags['release'] = release_tag
dest_distribution.repositories[repo_name] = dest_repo_data
elif dest_distribution.repositories[repo_name].release_repository.version is None:
elif dest_distribution.repositories[repo_name].release_repository is not None and \
dest_distribution.repositories[repo_name].release_repository.version is None:
dest_distribution.repositories[repo_name].release_repository.version = repo_data.release_repository.version
repositories_to_retry.append(repo_name)
else:
Expand Down

0 comments on commit 0cf9944

Please sign in to comment.