Example #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);
        }
Example #2
0
        //�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();
        }
Example #3
0
        //�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();
        }
Example #4
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();
        }
Example #5
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");
        }
Example #6
0
        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);
        }
Example #7
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";
        }
Example #8
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;
        }