Esempio n. 1
0
 public HgRepositoryMetadataProvider(IHgRepository repository, Config configuration)
 {
     _mergeBaseCache = new Dictionary <Tuple <IBranchHead, IBranchHead>, MergeBaseData>();
     _semanticVersionTagsOnBranchCache = new Dictionary <IBranchHead, List <SemanticVersion> >();
     _repository    = repository;
     _configuration = configuration;
 }
 /// <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;
 }
Esempio n. 3
0
 public static IHgRepository WithLogger(this IHgRepository repository)
 {
     return(new RepositoryLogger(repository));
 }
Esempio n. 4
0
 public TestVesionContext(bool inited = true)
 {
     _repository = CreateTempRepository(inited)
                   .WithLogger();
 }
 public RepositoryLogger(IHgRepository repository)
 {
     _repository = repository;
 }