public virtual void SyncRemoteFromLocal() { var address = new HttpRepositoryPath("localrepo", Local.Repository.PathToRepo, false); Remote.Repository.Pull(address, Local.Repository.PathToRepo); Remote.Repository.Update(); }
public void CloneRemoteFromLocal() { //Remote.Repository.Init(); var address = new HttpRepositoryPath("localrepo", Local.Repository.PathToRepo, false); Remote.Repository.Pull(address, Local.Repository.PathToRepo); Remote.Repository.Update(); }
public void RepositoryURIForLog_ChorusHubWithVariable_DoesNotThrow() { const string uri = "http://[email protected]:5913/" + RepositoryAddress.ProjectNameVariable; var address = new HttpRepositoryPath("whatever", uri, false); // SUT var result = new HgRepository("ssh://nowhere", _progress).RepositoryURIForLog(address); Assert.AreEqual(uri, result); }
public void RepositoryURIForLog_ContainsNoPassword() { const string uri = "https://hg-public.languageforge.org/project/tpi-flex"; var address = new HttpRepositoryPath("whatever", uri, false); // SUT var result = new HgRepository("ssh://nowhere", _progress).RepositoryURIForLog(address); Assert.AreEqual(uri, result); }
public void Pull_Test() { //RobustNetworkOperation.ClearCredentialSettings(); using (var f = new TemporaryFolder("pulltest")) { var repo = HgRepository.CreateOrUseExisting(f.Path, _progress); var address = new HttpRepositoryPath("default", _cloneableTestProjectUrl, false); repo.Pull(address, _cloneableTestProjectUrl); Assert.IsTrue(Directory.Exists(f.Combine(f.Path, ".hg"))); } }
public void PullThenPush_Test() { // RobustNetworkOperation.ClearCredentialSettings(); using (var f = new TemporaryFolder("pulltest")) { var repo = HgRepository.CreateOrUseExisting(f.Path, _progress); var address = new HttpRepositoryPath("default", _cloneableTestProjectUrl, false); repo.Pull(address, _cloneableTestProjectUrl); Assert.IsTrue(Directory.Exists(f.Combine(f.Path, ".hg"))); //nb: this is safe to do over an over, because it will just say "no changes found", never actually add a changeset repo.Push(address, _cloneableTestProjectUrl); } }
public void GetPotentialRepoUri_LeavesExistingUserInfo() { var source = new HttpRepositoryPath("test", UrlWithCredentials, false); Assert.AreEqual(UrlWithCredentials, source.GetPotentialRepoUri("testing", null, null)); }
public void GetPotentialRepoUri_ToleratesNullProjectName() { var source = new HttpRepositoryPath("test", UrlSansCredentials, true); Assert.AreEqual(UrlSansCredentials, source.GetPotentialRepoUri("testing", null, null)); }
public void GetPotentialRepoUri_ReplacesProjectNameVariable() { var source = new HttpRepositoryPath("test", UrlTemplate, true); Assert.AreEqual(UrlSansCredentials, source.GetPotentialRepoUri("testing", ProjectName, null)); }