Пример #1
0
        /// <inheritdoc />
        public IEnumerable <ICommit> Parents(ICommit commit)
        {
            if (!(commit is HgCommit hgCommit))
            {
                throw new InvalidOperationException($"{commit.GetType()} is not supported.");
            }

            var command = new ParentsCommand()
                          .WithRevision(hgCommit);

            return(_repository.Parents(command)
                   .Select(changeset => (HgCommit)changeset));
        }