public ICommit CurrentCommit() { using (Logger.IndentLog("Get current commit")) { return(_repository.CurrentCommit()); } }
/// <summary> /// Creates an instance of <see cref="HgVersionContext"/> /// </summary> /// <param name="repository">Mercurial retpository</param> public HgVersionContext(IHgRepository repository) { Repository = repository; CurrentBranch = repository.CurrentBranch(); CurrentCommit = repository.CurrentCommit(); FileSystem = new FileSystem(); FullConfiguration = HgConfigurationProvider.Provide(repository, FileSystem); RepositoryMetadataProvider = new HgRepositoryMetadataProvider(repository, FullConfiguration); Configuration = CalculateEffectiveConfiguration(); CurrentCommitTaggedVersion = CalculateCurrentCommitTaggedVersion(); IsCurrentCommitTagged = CurrentCommitTaggedVersion != null; }