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) How reproducible: Always Steps to Reproduce: 1. Download po file zip from any project version 2. Push as the project maintainer with maven client: mvn zanata:push Actual results: The project source documents are deemed as obsolete. It acts as if the project version is wiped out. Expected results: 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) Additional info:
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". See: https://github.com/zanata/zanata-client/compare/1dcd0fcadb920bd3f7d0d9ee8a1e13a77d4244fc...11bbf8718af812c10af7dc65d65d5e04234e4be8
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). e.g. [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.