Red Hat Bugzilla – Bug 922584
Error should be shown if project maintainer push a project without translation
Last modified: 2013-11-26 22:36:13 EST
Description of problem:
Project maintainer might accidently wipe out the project if source files are absent, which is quite common for offlinepo project type or po file zip download.
Version-Release number of selected component (if applicable):
Zanata version 2.3-SNAPSHOT (20130314-1234)
Steps to Reproduce:
1. Download po file zip from any project version
2. Push as the project maintainer with maven client:
The project source documents are deemed as obsolete.
It acts as if the project version is wiped out.
Without explicit declear either pushType=both or zanata.pushType=src,
push should stop and print error message: "No source documents exist".
If either pushType=both or zanata.pushType=src is explicit specified,
then show warning instead and ask for confirmation. (This is current behavior)
Updated cli client and maven plugin so that source is never used for project type 'offlinepo'.
- If user tries to push or pull with type "source", an error is shown and the command is aborted.
- If user tries to push or pull with type "both", a warning is shown indicating that source will be ignored, and the command continues as though type is "trans".
The initial description appears to suggest that a confirmation message is not shown for pushType=src, but this could not be reproduced - a confirmation message is always shown immediately after messages stating that obsolete files will be deleted. The only time this should not happen is when interactive mode is disabled (it is enabled by default).
[INFO] No source documents found.
[WARNING] Found 2 obsolete docs on the server which will be DELETED
[INFO] Obsolete docs: [doc1.txt, doc2.txt]
This will overwrite existing source documents on the server, and delete obsolete documents.
Are you sure (y/n)? n
Verified on zanata-maven-plugin 2.2.1-SNAPSHOT
Closing VERIFIED bugs for Zanata versions <= 3.1.