Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion dfetch/commands/add.py
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,7 @@ def _finalize_add(
return

superproject.manifest.append_project_entry(project_entry)
superproject.manifest.update_dump()
superproject.manifest.dump()
logger.print_info_line(
project_entry.name,
f"Added '{project_entry.name}' to manifest '{superproject.manifest.path}'",
Expand Down
2 changes: 1 addition & 1 deletion dfetch/commands/freeze.py
Original file line number Diff line number Diff line change
Expand Up @@ -135,5 +135,5 @@ def __call__(self, args: argparse.Namespace) -> None:
manifest_updated = True

if manifest_updated:
superproject.manifest.update_dump()
superproject.manifest.dump()
logger.info(f"Updated manifest ({manifest_path}) in {os.getcwd()}")
10 changes: 9 additions & 1 deletion dfetch/commands/import_.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,11 +58,19 @@ def __call__(self, _: argparse.Namespace) -> None:
project.set_remote(remote)
break

single_remote = len(remotes) == 1
project_dicts = []
for p in projects:
d = p.as_yaml()
if single_remote:
d.pop("remote", None)
project_dicts.append(d)

manifest_data = {
"manifest": {
"version": "0.0",
"remotes": [r.as_yaml() for r in remotes],
"projects": [p.as_yaml() for p in projects],
"projects": project_dicts,
}
}
manifest = Manifest.from_yaml(yaml.dump(manifest_data, sort_keys=False))
Expand Down
Loading
Loading