Exemple #1
0
 def push_local_commits_to_server(self, username=None, password=None):
     dcommit_command = ['svn', 'dcommit', '--rmdir']
     if (not username or not password) and not self.has_authorization_for_realm(self.svn_server_realm):
         raise AuthenticationError(self.svn_server_host, prompt_for_password=True)
     if username:
         dcommit_command.extend(["--username", username])
     output = self._run_git(dcommit_command, error_handler=commit_error_handler, input=password)
     return output
Exemple #2
0
    def commit_with_message(self, message, username=None, password=None, git_commit=None, force_squash=False, changed_files=None):
        # git-commit and force are not used by SVN.
        svn_commit_args = ["commit"]

        if not username and not self.has_authorization_for_realm(self.svn_server_realm):
            raise AuthenticationError(self.svn_server_host)
        if username:
            svn_commit_args.extend(["--username", username])

        svn_commit_args.extend(["-m", message])

        if changed_files:
            svn_commit_args.extend(changed_files)

        return self._run_svn(svn_commit_args, cwd=self.checkout_root, error_handler=commit_error_handler)