public override Revision GetRevision(string alias) { string url = Url.TrimEnd('/'); string tempFolder = Context.Current.MapPath(Core.Settings.rootPath + "/svnRepoTemp/"); if (System.IO.Directory.Exists(tempFolder)) { System.IO.Directory.Delete(tempFolder); } using (SvnClient client = new SvnClient()) { client.LoadConfiguration("path"); client.Authentication.DefaultCredentials = new NetworkCredential(Login, Password); SvnTarget folderTarget = SvnTarget.FromString(url); client.Export(folderTarget, tempFolder); RevisionStorage rs = new RevisionStorage(); var r = rs.GetFromDirectory(alias, tempFolder + alias); rs.Save(r, alias); rs.Dispose(); return(r); } return(null); }
/* LOADING A PREPACKAGED REVISION */ public override Revision GetRevision(string alias) { string _folder = ""; string _name = alias; //if alias is actually an absolute path if (System.IO.Directory.Exists(alias)) { _folder = alias; _name = _folder.TrimEnd(IO.DirSepChar).Substring(_folder.LastIndexOf(IO.DirSepChar)).Trim(IO.DirSepChar); } else if (alias.Contains("/")) { //If alias is actually a relative path _folder = ExecutionContext.MapPath(alias); } else { //if just an alias _folder = ExecutionContext.MapPath(Core.Settings.revisionsPath + "/" + alias); } RevisionStorage revstorage = new RevisionStorage(); var revi = revstorage.GetFromDirectory(_name, _folder, true); revstorage.Dispose(); return(revi); }
//�Public�Methods�(4) public override void CommitRevision(Revision revision) { string path = System.IO.Path.Combine(Path, revision.Name); RevisionStorage revstorage = new RevisionStorage(); revstorage.Save(revision, path); revstorage.Dispose(); }
//�Public�Methods�(4)� public override void CommitRevision(Revision revision) { string path = System.IO.Path.Combine(Path, revision.Name); RevisionStorage revstorage = new RevisionStorage(); revstorage.Save(revision, path); revstorage.Dispose(); }
public override void CommitRevision(Revision revision) { //remember to reset dir, so we don't save on the old location... revision.Directory = string.Empty; RevisionStorage revstorage = new RevisionStorage(); revstorage.Save(revision); revstorage.Dispose(); }
public override Revision GetRevision(string alias) { string path = System.IO.Path.Combine(Path, alias); RevisionStorage revstorage = new RevisionStorage(); var rev = revstorage.GetFromDirectory(alias, path); revstorage.Dispose(); return rev; }
public override Revision GetRevision(string alias) { string path = System.IO.Path.Combine(Path, alias); RevisionStorage revstorage = new RevisionStorage(); var rev = revstorage.GetFromDirectory(alias, path); revstorage.Dispose(); return(rev); }
public string[] GetAvailableRevisions(string username, string password) { //Auth login and IP AuthorizeClient(username, password); RevisionStorage revstorage = new RevisionStorage(); List <string> revs = revstorage.GetAllLocalRevisions(); revstorage.Dispose(); return(revs.ToArray()); }
public string CommitRevision(Umbraco.Courier.Core.Revision revision, string username, string password) { //Auth login and IP AuthorizeClient(username, password); RevisionStorage revstorage = new RevisionStorage(); revstorage.Save(revision); revstorage.Dispose(); return("woo"); }
public string CommitResourceitem(String revision, Core.ResourceItem resourceItem, string username, string password) { //Auth login and IP AuthorizeClient(username, password); RevisionStorage revstorage = new RevisionStorage(); revstorage.SaveResourceItem(resourceItem, revision); revstorage.Dispose(); return("woo"); }
public List <ExceptionProxy> ValidateRevision(string directory, string username, string password) { //Auth login and IP AuthorizeClient(username, password); RevisionStorage revstorage = new RevisionStorage(); var rev = revstorage.GetFromDirectory(directory, directory); revstorage.Dispose(); return(new List <ExceptionProxy>()); // return createProxy( rev.Validate() ); }
public override Revision GetRevision(string alias) { string url = Url.TrimEnd('/') + "/" + alias; string tempFolder = TempFolderPath(alias); //ensure we have the latest version checkout(alias); RevisionStorage rs = new RevisionStorage(); var r = rs.GetFromDirectory(alias, tempFolder); rs.Save(r, alias); rs.Dispose(); return(r); }
public override Revision GetRevision(string alias) { string _folder = ""; string _name = alias; if (System.IO.Directory.Exists(alias)) { _folder = alias; _name = _folder.TrimEnd(IO.DirSepChar).Substring(_folder.LastIndexOf(IO.DirSepChar)).Trim(IO.DirSepChar); } else { _folder = Context.Current.MapPath(Core.Settings.revisionsPath + "/" + alias); } RevisionStorage revstorage = new RevisionStorage(); var revi = revstorage.GetFromDirectory(_name, _folder); revstorage.Dispose(); return(revi); }
/* LOADING A PREPACKAGED REVISION */ public override Revision GetRevision(string alias) { string _folder = ""; string _name = alias; //if alias is actually an absolute path if (System.IO.Directory.Exists(alias)) { _folder = alias; _name = _folder.TrimEnd(IO.DirSepChar).Substring(_folder.LastIndexOf(IO.DirSepChar)).Trim(IO.DirSepChar); } else if(alias.Contains("/")) { //If alias is actually a relative path _folder = ExecutionContext.MapPath(alias); }else { //if just an alias _folder = ExecutionContext.MapPath(Core.Settings.revisionsPath + "/" + alias); } RevisionStorage revstorage = new RevisionStorage(); var revi = revstorage.GetFromDirectory(_name, _folder, true); revstorage.Dispose(); return revi; }
public override Revision GetRevision(string alias) { string url = Url.TrimEnd('/'); string tempFolder = Context.Current.MapPath(Core.Settings.rootPath + "/svnRepoTemp/"); if (System.IO.Directory.Exists(tempFolder)) System.IO.Directory.Delete(tempFolder); using (SvnClient client = new SvnClient()) { client.LoadConfiguration("path"); client.Authentication.DefaultCredentials = new NetworkCredential(Login, Password); SvnTarget folderTarget = SvnTarget.FromString(url); client.Export(folderTarget, tempFolder); RevisionStorage rs = new RevisionStorage(); var r = rs.GetFromDirectory(alias, tempFolder + alias); rs.Save(r, alias); rs.Dispose(); return r; } return null; }
public List<ExceptionProxy> ValidateRevision(string directory, string username, string password) { //Auth login and IP AuthorizeClient(username, password); RevisionStorage revstorage = new RevisionStorage(); var rev = revstorage.GetFromDirectory(directory, directory); revstorage.Dispose(); return new List<ExceptionProxy>(); // return createProxy( rev.Validate() ); }
public string[] GetAvailableRevisions(string username, string password) { //Auth login and IP AuthorizeClient(username, password); RevisionStorage revstorage = new RevisionStorage(); List<string> revs = revstorage.GetAllLocalRevisions(); revstorage.Dispose(); return revs.ToArray(); }
public string CommitRevisionitem(String revision, Core.RevisionItem revisionItem, string username, string password) { //Auth login and IP AuthorizeClient(username, password); RevisionStorage revstorage = new RevisionStorage(); revstorage.SaveRevisionItem(revisionItem, revision); revstorage.Dispose(); return "woo"; }
public string CommitRevision(Umbraco.Courier.Core.Revision revision, string username, string password) { //Auth login and IP AuthorizeClient(username, password); RevisionStorage revstorage = new RevisionStorage(); revstorage.Save(revision); revstorage.Dispose(); return "woo"; }