| |
| | |

CodersClub

 Forgot password?
 Register
Search
View: 15064|Reply: 14
Collapse the left

How to automate the upload from SVN repository

[Copy link]

 Russia

Post time: 2011-09-27 11:20
| Show all posts |Read mode
Lake said that it is very hard to manually find and upload to a hosting all the updated files.

As I know, there are some special PHP scripts that can automate such type job.
The idea is very simple:
Upload a "HP SVN Client" to your site.
Protect this script from unauthorized access.
Configure the script - Set SVN URL, (username and password if required) and your code location.
Set permissions for your local code for enable the PHP SVN Client to rewrite your files.
Then point your browser to your PHP SVN Client and click a button like "Update project".
That's all!

I did not tried yet such type client...
You can try to search and test such scripts by yourself!
How to search: Google it - "HP SVN Client"

 Russia

 Author| Post time: 2011-09-27 20:41
| Show all posts
Good news:

After a long web surfing, I have found a product that may be usefull for our goals:
It is the "Pure PHP SVN Client"
http://code.google.com/p/phpsvnclient/

Description:

This PHP class provides a solution to retrieve files from a remote SVN repository using only pure PHP code, i.e. without relying on a separate SVN client program.
It accesses a given remove SVN repository using the WebDAV protocol and perform several types of operations:
- List all files in a given SVN repository directory
- Retrieve a given revision of a file
- Retrieve the log of changes made in a repository or in a given file between two revisions
- Get the repository latest revision
- Save the latest files to specified directory

The product is small and does not require to install any additional software to your site.
Unpacked size is 114K only!

I have downloaded this product, and now checking it.
Seems work ok...

 Russia

 Author| Post time: 2011-09-28 19:09
| Show all posts
Yes!!!
Done!!!  

The /dzx20/ test forum is updated ONLINE to the latest repository version ( 73 ) !

What was done:
1) The "Pure PHP SVN Client" slightly modified (I have found some bugs).
2) Created an executable script (that make a call to the phpsvnclient class) for update your site from the SVN directly.
3) Tested at my local computer
4) Tested at the remote host (codersclub.org/dzx20/)
Works fine!!!

Now I am preparing a downloadable package and instructions for you...
Will be published as soon as possible

 Russia

 Author| Post time: 2011-09-29 16:10
| Show all posts
Found yet another bugs in phpsvnclient.
Fixed.
As a result, the /dzx20/ test forum is updated ONLINE from version 73 to version 74.

 Russia

 Author| Post time: 2011-10-02 12:05
| Show all posts
Found yet another bug:
When I use this utility for update my site,
I have no the top repository folders: PSD, upload, utility.
My site working copy root folder is corresponding to the "upload" repository folder.

So, when some file laying upper the "upload" folder is modified, this utility reports an error:
"Can not find the directory "../PSD/...".

Of course, this waring may be ignored.
But it is not nice, when any warning is occured.

Will think how to eliminate such warnings...

 Russia

 Author| Post time: 2011-10-05 13:33
| Show all posts
Online updating screen looks like this:
  1. PHP SVN Update
  2. Working copy version: 86
  3. Repository version: 87
  4. ************************
  5. Added or modified file: /trunk/discuzx2.0/upload/template/default/home/space_pm.htm
  6. Added or modified file: /trunk/discuzx2.0/upload/source/discuz_version.php
  7. Added or modified file: /trunk/discuzx2.0/upload/source/language/home/lang_template.php
  8. Update is finished.
Copy the Code


Post time: 2012-02-05 03:26
| Show all posts
very good idea, hope it will be realised

 Russia

 Author| Post time: 2012-02-05 11:24
| Show all posts
The idea is not so good as it seems at the first sight.
The problem is that any modified file will be entire overwritten at your host.
If you have made any your own changes in a file, this changes will be lost.

 Palestine

Post time: 2012-02-05 13:24
| Show all posts
vot replied at 2012-2-5 10:24
The idea is not so good as it seems at the first sight.
The problem is that any modified file will b ...

mm , Can we Exclude some files from the update process ?
e.g Exclude template files

 Russia

 Author| Post time: 2012-02-05 13:49
| Show all posts
Can we Exclude some files from the update process ?

Will try to realize...
You have to log in before you can reply Login | Register

Points Rules

Archive|Mobile|Dark room|CodersClub

Top.Mail.Ru
Top.Mail.Ru

2024-11-21 22:30 GMT+3 , Processed in 0.090734 sec., 8 queries .

Powered by Discuz! X3.4 Release 20230520

© 2001-2024 Discuz! Team.

MultiLingual version, Rev. 4301, © codersclub.org

Quick Reply To Top Return to the list