Example #1
0
        internal static SvnCommittedEventArgs Create(SvnClientContext client, svn_commit_info_t commitInfo, AprPool pool)
        {
            if (client == null)
            {
                throw new ArgumentNullException(nameof(client));
            }
            if (pool == null)
            {
                throw new ArgumentNullException(nameof(pool));
            }

            if (commitInfo == null || (commitInfo.revision <= 0L))
            {
                return(null);
            }

            return(new SvnCommittedEventArgs(commitInfo, pool));
        }
Example #2
0
        internal unsafe SvnCommitResult(svn_commit_info_t commitInfo, AprPool pool)
        {
            if (commitInfo == null)
            {
                throw new ArgumentNullException(nameof(commitInfo));
            }
            if (pool == null)
            {
                throw new ArgumentNullException(nameof(pool));
            }

            Revision = commitInfo.revision;

            long        when = 0;
            svn_error_t err  = svn_time.svn_time_from_cstring(ref when, commitInfo.date, pool.Handle); // pool is not used at this time (might be for errors in future versions)

            if (err == null)
            {
                Time = SvnBase.DateTimeFromAprTime(when);
            }
            else
            {
                svn_error.svn_error_clear(err);
                Time = DateTime.MinValue;
            }

            Author = SvnBase.Utf8_PtrToString(commitInfo.author);

            PostCommitError = commitInfo.post_commit_err != null
                            ? SvnBase.Utf8_PtrToString(commitInfo.post_commit_err)
                              .Replace("\n", Environment.NewLine)
                              .Replace("\r\r", "\r")
                            : null;

            if (commitInfo.repos_root != null)
            {
                RepositoryRoot = SvnBase.Utf8_PtrToUri(commitInfo.repos_root, SvnNodeKind.Directory);
            }
        }
        internal void ProvideCommitResult(svn_commit_info_t commit_info, AprPool pool)
        {
            CommitResult = SvnCommittedEventArgs.Create(_client, commit_info, pool);

            _client.HandleClientCommitted(CommitResult);
        }
Example #4
0
 SvnCommittedEventArgs(svn_commit_info_t commitInfo, AprPool pool)
     : base(commitInfo, pool)
 {
 }