Передача заархивированного файла в SVN в Java не работает - PullRequest
0 голосов
/ 16 апреля 2020

Я пытаюсь запустить следующий код, чтобы зафиксировать обновленный zip-файл в SVN. Я не получаю никаких ошибок, но когда я проверяю файл в SVN, ничего не меняется.

InputStream "in" указывает на место, где файл извлекается. Я изменил содержимое zip-файла, и Черепаха показывает, что он изменился.

Вот мой код:

                    SVNRepository repo = SVNRepositoryFactory.create(
                            SVNURL.parseURIEncoded("https://someserver.com/dir1/dir2/dir3/dir4/trunk/RulesADBQuickDeploy"));

                    ISVNAuthenticationManager auth =
                            SVNWCUtil.createDefaultAuthenticationManager(txtSVNUserId.getText(),
                                    txtSVNPassword.getPassword());
                    repo.setAuthenticationManager(auth);

                    ISVNEditor editor = repo.getCommitEditor(txtComments.getText(), null);
                    editor.openRoot(-1);
                    editor.openFile("an_existing_zip_file.zip", -1);
                    editor.applyTextDelta("an_existing_zip_file.zip", null);

                    SVNDeltaGenerator gen = new SVNDeltaGenerator();
                    InputStream in = new FileInputStream(txtLocation.getText() + "\\RulesADBQuickDeploy\\an_existing_zip_file.zip");

                    String checkSum = gen.sendDelta("an_existing_zip_file.zip", in, editor, true);
                    in.close();

                    editor.closeFile("an_existing_zip_file.zip", checkSum);
                    editor.closeDir();
                    info = editor.closeEdit();
...