public static GitJournalHelper InitializeWithExistingRepo(ITestOutputHelper testOutput, string repoRoot)
        {
            var helper = new GitJournalHelper(testOutput, null, repoRoot);

            helper.ResetToMaster();
            return(helper);
        }
        public static GitJournalHelper Clone(ITestOutputHelper testOutput, bool useGvfs, string repoUrl = null)
        {
            var repoRoot = useGvfs
                ? null // GVFSFunctionalTestEnlistment.CloneAndMount will create m_enlistment which will hold the root
                : Path.Combine(Path.GetTempPath(), $"BuildXL.Test.{Guid.NewGuid()}");
            var helper = new GitJournalHelper(testOutput, repoUrl, repoRoot);

            helper.Clone(useGvfs);
            return(helper);
        }
Exemple #3
0
        public GitJournalHelper Clone(RepoConfig cfg)
        {
            bool useGvfs = cfg.RepoKind == RepoKind.Gvfs;
            var  helper  = cfg.RepoInit == RepoInit.Clone
                ? GitJournalHelper.Clone(TestOutput, useGvfs)
                : GitJournalHelper.InitializeWithExistingRepo(TestOutput, GitRepoLocation(useGvfs));

            if (useGvfs)
            {
                // tracking GVFS_projection file so that we can assert that this file indeed changed
                // whenever the actual file changes are not yet reflected in the filesystem
                helper.TrackGvfsProjectionFile();
            }

            return(helper);
        }
 public RepoReseter(GitJournalHelper helper, string branch)
 {
     Helper     = helper;
     BranchName = branch;
 }