Merge pull request #441 from fanf/bug_4476/XML_pretty_printing_of_configuration_repo_files_may_erase_newlines

Fixes #4476: Correct the XML pretty printer to always preserve spaces
Fixes #4479: do not generate promise after an archiving