コード例 #1
0
        public static Commit WithRevision(this Commit commit, FileInfo file, string revision, DateTime time = default(DateTime),
                                          string mergepoint = null, bool isDead = false)
        {
            var mergepointRevision = (mergepoint == null) ? Revision.Empty : Revision.Create(mergepoint);

            var fileRevision = file.CreateRevision(revision, commit.CommitId, time: time, mergepoint: mergepoint, isDead: isDead);

            commit.Add(fileRevision);
            file.AddCommit(commit, fileRevision.Revision);

            return(commit);
        }