Exemple #1
0
        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);
        }
Exemple #2
0
        /* 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();
        }
Exemple #5
0
        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);
        }
Exemple #8
0
        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());
        }
Exemple #9
0
        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");
        }
Exemple #10
0
        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");
        }
Exemple #11
0
        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);
        }
Exemple #13
0
        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);
        }
Exemple #14
0
        /* 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;
        }
Exemple #16
0
        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() );
        }
Exemple #17
0
        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();
        }
Exemple #18
0
        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";
        }
Exemple #19
0
        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";
        }