You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by Yuri Timofeev <ti...@gmail.com> on 2008/09/20 17:38:41 UTC

web interface for managing export a website from repository

Hi
Written on PHP for himself, perhaps these scripts will be somebody
needed. Write to me, I put the code, for example, in Sourceforge.

Description:


A set of scripts named "svnexport" is intended to update the Web site
from the Subversion repository by using
"svn export [options]" command.
You can work through a Web interface or from the command line.


The scheme of works
~~~~~~~~~~~~~~~~~~~

Attention! The script svnexport.php should be placed outside catalog
the Web site.
Attention! Catalog/section of the website (or DocumentRoot for the
entire website),
which will be updated through the "svn export" must be a symlink!

Approximate scheme directories on a website:

[some dir]
 |
 +--site_dir --(symlink)--> site_dir.1
 |
 +--site_dir.1
 |
 +--site_dir.2
 |
 |
 +--svnctrl (web interface for svnexport)


The scheme of a works through a Web interface:
    - user authorization (names, passwords are set up in the
configuration file);
    - enter in web form the revision parameter (optional). See "svn
help export" for details.
    - after clicking "Run svn export" button in the web form  on the
disk creates a file FLAG with data for export;
    - svnexport.php script runs in cron, for example, every 10-15
minutes and monitors the presence of a file FLAG;
    - if the FLAG file exists, then read the data for export, mainly
is setting "revision";
    - further deleted all the files/subdirectories from off-site
catalog site_dir.2
(see above diagram of directories on the webserver);
    - do svn export in site_dir.2;
    - if all successful, the symlink
        site_dir -> site_dir.1
      is replaced by
        site_dir -> site_dir.2
NOTE. The next launch svnexport.php will be cleaned a off-site
directory site_dir.1.
svn export will be into site_dir.1 and symlink site_dir will reassign
from site_dir.2 to site_dir.1.
    - after the successful completion of works, called a user script HOOKAFTER.
In the script HOOKAFTER can be, such as setting rights for files and
directories.
    - the user(s) receives an email detailed report.

The scheme of a works through a command line:
    - sure to specify a parameter -f (force)
    - FLAG file and its contents are ignored, but at the end of it is
removed (if exists);
    - the rest work is being done as described above.



System requirements
~~~~~~~~~~~~~~~~~~~

PHP4 and later, http server, access to the server file system and crond.


Notes
~~~~~

Method autoupdate website after each commit described here
http://subversion.tigris.org/faq.html#website-auto-update
but in some systems, it does not work.



-- 
with best regards

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

Re: web interface for managing export a website from repository

Posted by Yuri Timofeev <ti...@gmail.com>.
> Written on PHP for himself, perhaps these scripts will be somebody needed.

http://sourceforge.net/projects/svnexport/


-- 
with best regards

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

Re: web interface for managing export a website from repository

Posted by Yuri Timofeev <ti...@gmail.com>.
>2008/9/22 Ryan Schmidt <su...@ryandesign.com>:
> On Sep 20, 2008, at 12:38 PM, Yuri Timofeev wrote:
>
>> Written on PHP for himself, perhaps these scripts will be somebody
>> needed. Write to me, I put the code, for example, in Sourceforge.
>>
>> Description:
>>
>>
>> A set of scripts named "svnexport" is intended to update the Web site
>> from the Subversion repository by using
>> "svn export [options]" command.
>> You can work through a Web interface or from the command line.
>
>
> You may also want to look into this perl module which may already do what
> you want:
>
>
>        http://search.cpan.org/search?query=SVN::Notify::Mirror
>

Thanks for the link.

First. There SVN::Notify::Mirror no have a web interface.

Second. Updating the production web-site is produced in
"SVN::Notify::Mirror" unsafe manner. In my script, all files in
web-site will immediately become updated (by switching symlink).


-- 
with best regards

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

Re: web interface for managing export a website from repository

Posted by Ryan Schmidt <su...@ryandesign.com>.
On Sep 20, 2008, at 12:38 PM, Yuri Timofeev wrote:

> Written on PHP for himself, perhaps these scripts will be somebody
> needed. Write to me, I put the code, for example, in Sourceforge.
>
> Description:
>
>
> A set of scripts named "svnexport" is intended to update the Web site
> from the Subversion repository by using
> "svn export [options]" command.
> You can work through a Web interface or from the command line.


You may also want to look into this perl module which may already do  
what you want:


	http://search.cpan.org/search?query=SVN::Notify::Mirror



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org