Esempio n. 1
0
        public SyncResults CheckinAndPullAndMerge(RepositoryWithFilesSetup syncWithUser)
        {
            var options = new SyncOptions
            {
                DoMergeWithOthers = true,
                DoPullFromOthers  = true,
                DoSendToOthers    = false
            };

            options.RepositorySourcesToTry.Add(syncWithUser.RepoPath);

            return(SyncWithOptions(options));
        }
Esempio n. 2
0
        private RepositoryWithFilesSetup(string userName, RepositoryWithFilesSetup cloneFromUser)
        {
            Progress   = new MultiProgress(new IProgress[] { new ConsoleProgress(), _stringProgress });
            RootFolder = new TemporaryFolder("ChorusTest-" + userName + "-" + Guid.NewGuid());
            Console.WriteLine("TestRepository Cloned: {0}", RootFolder.Path);
            string pathToProject = RootFolder.Combine(Path.GetFileName(cloneFromUser.ProjectFolder.Path));

            //cloneFromUser.Synchronizer.MakeClone(pathToProject, true);
            HgHighLevel.MakeCloneFromUsbToLocal(cloneFromUser.Repository.PathToRepo, pathToProject, Progress);

            ProjectFolder = TemporaryFolder.TrackExisting(RootFolder.Combine("foo project"));
            string pathToOurLiftFile = ProjectFolder.Combine(Path.GetFileName(cloneFromUser.UserFile.Path));

            UserFile = TempFile.TrackExisting(pathToOurLiftFile);

            Init(userName);
        }
Esempio n. 3
0
 public static RepositoryWithFilesSetup CreateByCloning(string userName, RepositoryWithFilesSetup cloneFromUser)
 {
     return(new RepositoryWithFilesSetup(userName, cloneFromUser));
 }