473,614 Members | 2,076 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Publish to live site from Subversion

Ive been using Subversion for a while to maintain the PHP web apps and
sites I develop in my Windows box. But when I want to publish a new
release I update the live site manually and I want to improve this process.

I cant simply export to a fresh directory and upload all files because
that wont handle renames and deletions (and the upload will take
forever anyway). I typically use WinMerge to find out what files changed
but therere some drawbacks:

* It cant compare files through FTP (and if it could, I guess itd need
to download the whole site every time) so I need to maintain a local
copy of the live site and upload files manually.

* It cant use the repository information so it wont ignore
non-versioned items (settings, uploads, caches, data) unless I maintain
a separate filter duplicating the svn:ignore data.

I could keep my current method and write a bunch of Subversion hook
scripts in PHP (Im not proficient in any other language available) to
keep the data in synch but I looks like a overwhelming effort that can
easily break. So I wonder how is everyone else doing it. But according
to my googling the answer is: writing lots of custom scripts!

Is it the only way? Is there a tool to help with this common task? Can
Apache Ant be used for this? How do *you* do it?

--
-- http://alvaro.es - lvaro G. Vicario - Burgos, Spain
-- Mi sitio sobre programacin web: http://bits.demogracia.com
-- Mi web de humor al bao Mara: http://www.demogracia.com
--
Nov 13 '08 #1
9 5995
lvaro G. Vicario wrote:
Ive been using Subversion for a while to maintain the PHP web apps and
sites I develop in my Windows box. But when I want to publish a new
release I update the live site manually and I want to improve this process.

I cant simply export to a fresh directory and upload all files because
that wont handle renames and deletions (and the upload will take
forever anyway). I typically use WinMerge to find out what files changed
but therere some drawbacks:

* It cant compare files through FTP (and if it could, I guess itd need
to download the whole site every time) so I need to maintain a local
copy of the live site and upload files manually.

* It cant use the repository information so it wont ignore
non-versioned items (settings, uploads, caches, data) unless I maintain
a separate filter duplicating the svn:ignore data.

I could keep my current method and write a bunch of Subversion hook
scripts in PHP (Im not proficient in any other language available) to
keep the data in synch but I looks like a overwhelming effort that can
easily break. So I wonder how is everyone else doing it. But according
to my googling the answer is: writing lots of custom scripts!

Is it the only way? Is there a tool to help with this common task? Can
Apache Ant be used for this? How do *you* do it?
I use svn or cvs here (depending on the project). I just keep a
development system then use one of the many FTP programs which compares
file date/time (ie. WinSCP, FileZilla, CoreFTP).

--
=============== ===
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
js*******@attgl obal.net
=============== ===
Nov 13 '08 #2
On Nov 13, 6:11*am, "lvaro G. Vicario"
<alvaroNOSPAMTH A...@demogracia .comwrote:
Ive been using Subversion for a while to maintain the PHP web apps and
sites I develop in my Windows box. But when I want to publish a new
release I update the live site manually and I want to improve this process.

I cant simply export to a fresh directory and upload all files because
that wont handle renames and deletions (and the upload will take
forever anyway). I typically use WinMerge to find out what files changed
but therere some drawbacks:

* It cant compare files through FTP (and if it could, I guess itd need
to download the whole site every time) so I need to maintain a local
copy of the live site and upload files manually.

* It cant use the repository information so it wont ignore
non-versioned items (settings, uploads, caches, data) unless I maintain
a separate filter duplicating the svn:ignore data.

I could keep my current method and write a bunch of Subversion hook
scripts in PHP (Im not proficient in any other language available) to
keep the data in synch but I looks like a overwhelming effort that can
easily break. So I wonder how is everyone else doing it. But according
to my googling the answer is: writing lots of custom scripts!

Is it the only way? Is there a tool to help with this common task? Can
Apache Ant be used for this? How do *you* do it?

--
--http://alvaro.es- lvaro G. Vicario - Burgos, Spain
-- Mi sitio sobre programacin web:http://bits.demogracia.com
-- Mi web de humor al bao Mara:http://www.demogracia.com
--
What I've been doing is to determine where the document root is on my
hosting (eg domain.com/html, public_html, whatever) and make that into
a symlink pointing to a different directory where the site lives.
Then when I have an update to do, I export the version I want to
upload, tarball it up, upload it to my hosting, expand it, and then
delete the old symlink and create a new on pointing to the new
directory. If you do both operations at the same time it's very
nearly atomic (eg rm html;ln -s versionNumber.h tml html).
Occasionally you'll run into a situation that requires you copy some
files from the 'old' directory and overwrite something in the 'new'
directory (such as image files that your users have uploaded,
etc. .htaccess and .htpasswd may also enter into the mix. It stays
largely clean, however.

This generally requires access to the command line of the server, and
not all hosting allows you to SSH into a shared server. (Nexcess.net
does, I'm working with them on a project currently.)

There's more than one way to skin this cat. rsync (if available)
would provide another solution, as well.
Nov 13 '08 #3
Ive been using Subversion for a while to maintain the PHP web apps and
sites I develop in my Windows box. But when I want to publish a new
release I update the live site manually and I want to improve this process.

I cant simply export to a fresh directory and upload all files because
that wont handle renames and deletions (and the upload will take
forever anyway). I typically use WinMerge ...
Why? Why don't you just do an "svn update" on the web server? Failing
that (because subversion is not installed, for example), you could try
to mount the site directory somehow to your computer and use the
subversion installation on your local PC to do the update.

But it really is much easier to install the subversion client on the web
server.

You might find this useful:
http://www.howtoforge.com/set-up-a-m...r-php-websites

Best regards,
--
Willem Bogaerts

Application smith
Kratz B.V.
http://www.kratz.nl/
Nov 14 '08 #4
Willem Bogaerts escribi:
>Ive been using Subversion for a while to maintain the PHP web apps
and sites I develop in my Windows box. But when I want to publish a
new release I update the live site manually and I want to improve
this process.

I cant simply export to a fresh directory and upload all files
because that wont handle renames and deletions (and the upload
will take forever anyway). I typically use WinMerge ...

Why? Why don't you just do an "svn update" on the web server?
It's an idea I hadn't thought about. If the live site is a working copy
of a special branch (let's say, branches/live) all I need to do is
merging the desired changes into branches/live and then updating the
working copy. Apache can be configured quite easily to prevent access to
..svn directories.

The only hassle is that I need to open my repositories to the outer
world. And, of course, a hosting service with Subversion client is not
always at your reach (where I live, customers seem to adore the
overpriced poor quality hosting offered by well known local brands).
Failing that (because subversion is not installed, for example), you
could try to mount the site directory somehow to your computer and
use the subversion installation on your local PC to do the update.
I recall having tried Windows' "Network Places" to mount an FTP site but
I discarded it because it was pretty useless (it would not allow command
line, drive mapping or shell extensions). But perhaps there's a
third-party tool I could use.

Thank you for your suggestions.
--
-- http://alvaro.es - lvaro G. Vicario - Burgos, Spain
-- Mi sitio sobre programacin web: http://bits.demogracia.com
-- Mi web de humor al bao Mara: http://www.demogracia.com
--
Nov 14 '08 #5
Jerry Stuckle escribi:
lvaro G. Vicario wrote:
>Ive been using Subversion for a while to maintain the PHP web apps
and sites I develop in my Windows box. But when I want to publish a
new release I update the live site manually and I want to improve this
process.
[...]
I use svn or cvs here (depending on the project). I just keep a
development system then use one of the many FTP programs which compares
file date/time (ie. WinSCP, FileZilla, CoreFTP).
The idea is feasible (Subversion keeps the original file dates) but all
FTP clients I've tried along the years are terrible at the task of
syncing trees. (Note to self: eval SyncBack again.) But I still need to
duplicate the handling of non-versioned items.

Thank you for the tip.

--
-- http://alvaro.es - lvaro G. Vicario - Burgos, Spain
-- Mi sitio sobre programacin web: http://bits.demogracia.com
-- Mi web de humor al bao Mara: http://www.demogracia.com
--

Nov 14 '08 #6
"Álvaro G. Vicario" wrote:
The only hassle is that I need to open my repositories to the outer
world.
As long as you're configuring apache properly, you'll open *only* the
subdirectories you want, not the enrite SVN tree.

Or am I missing something there?

--
----------------------------------
Iván Sánchez Ortega -ivan-algarroba-sanchezortega-punto-es-

----------(8-) el hombre con el rabin de la boina m s largu del mundo
Nov 14 '08 #7
The only hassle is that I need to open my repositories to the outer
world.
You can restrict access to a limited set of known IP addresses.
I recall having tried Windows' "Network Places" to mount an FTP site but
I discarded it because it was pretty useless (it would not allow command
line, drive mapping or shell extensions). But perhaps there's a
third-party tool I could use.
If you do a net search for "mount sshfs windows", you will probably find
some 3rd-party tools.

Best regards,
--
Willem Bogaerts

Application smith
Kratz B.V.
http://www.kratz.nl/
Nov 14 '08 #8
Ivn Snchez Ortega escribi:
"Álvaro G. Vicario" wrote:
>The only hassle is that I need to open my repositories to the outer
world.

As long as you're configuring apache properly, you'll open *only* the
subdirectories you want, not the enrite SVN tree.

Or am I missing something there?
What I meant is that, currently, all my repositories are limited to the
local network (or even with no network at all). To access them from the
internet I'd need to forward a port in the router and double-check
Apache configuration. Which is doable, but not done. If you're to allow
outsiders into your room you need to make sure your drawers are properly
locked.

--
-- http://alvaro.es - lvaro G. Vicario - Burgos, Spain
-- Mi sitio sobre programacin web: http://bits.demogracia.com
-- Mi web de humor al bao Mara: http://www.demogracia.com
--
Nov 14 '08 #9
"Álvaro G. Vicario" wrote:
What I meant is that, currently, all my repositories are limited to the
local network (or even with no network at all). To access them from the
internet I'd need to forward a port in the router and double-check
Apache configuration. Which is doable, but not done.
You could use either port-based virtualhosts, or .htaccess and an IP filter.

--
----------------------------------
Iván Sánchez Ortega -ivan-algarroba-sanchezortega-punto-es-

XML is like violence. If it doesn't solve the problem, use more.
-- Fjolnir, on Slashdot
Nov 14 '08 #10

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
2928
by: Arthur Chereau | last post by:
Hi, I'm trying to setup viewcvs to work with subversion 1.2.0 on Linux with Python 2.4.1. The last viewcvs (from CVS) needs subversion python bindings. I installed swig and built subversion from source with it. Everything works fine until I try to build the Python bindings. When I try "make swig-py" I get the following, Python related, error: # make swig-py
2
1559
by: msnews.microsoft.com | last post by:
I'm looking for a one-step publish to server solution. I'm developing my web app in VS.NET and use my local IIS for testing. When ready to publish the latest release, I'd like to be able to hit "publish" so all the dll and aspx files are uploaded. I do not want source files on the live server. I do have full admin access to the live server I wish to publish to. Right now I'm using dreamweaver to publish, since I can select which files I...
8
3159
by: Graham | last post by:
I noticed a similar post awhile ago and in terms of my problem it wasnt a suitable answer so I will ask again. I have VS2005 running a on development machine in my office where I do all my development on existing and new applications. This environment also has its own Sql Server with dev versions of all our live Databases. Our live production server also its own Sql Server, these 2 Sql Servers are kept completely separate (for obvious...
9
2372
by: Alex Greenberg | last post by:
I don't know, but I find the Publish Web Site feature very lacking and weak. I mean, why does the damn thing have to delete unrelated directories like /images /documents etc. This is so impractical, what if my users generate these documents or images through their interaction with the site, and then I change some code and publish it, boom, everything is gone. I cannot put these folders outside the solution due to security/pathing...
2
3447
by: genc_ymeri | last post by:
Hi over there, I suddenly started to get the below error when I try to publish my websites, in any of them ! I tried to google it but not much info. Any help very much appreciated, thanks in advance,
3
3867
by: =?Utf-8?B?UGFvbG8gTmljY29sw7IgR2l1YmVsbGkgW0F4ZXR0 | last post by:
I have a website with a public folder (users can upload images into it) so I'm wondering if it's possible to avoid the deletion of this folder when I re-publish the website from visual studio. Do I have to set particular permissions on the server? Thank you in advance! Paolo
19
1866
by: nyhetsgrupper | last post by:
Hi, Which project type do you prefer? Is the web site or web application project the best solution? The application I am about to write is completly new so migrating from vs 2003 is not an issue, but it has to be easy to deploy the application (precompiled, I don't want to give away my source)
9
2919
by: Jason | last post by:
Hi all, I am no longer able to publish a web site project using Visual Studio 2005 Professional. I am publishing it to an FTP url, and this used to work just fine. I enter the username and password and select "passive mode" when publishing the site, like I have always done. Visual Studio deletes the existing files, but then doesn't write the new ones, though it tells me the operation was
0
1248
by: Tim Royal | last post by:
Hey there. I've searched the web to find a solution to this problem, but couldn't find anybody else experiencing it. I'm using Visual Studio 2008, and have several projects for customers that I routinely publish via FTP to live servers hosted at various places (web.com, valueweb.com, etc.) All of the ones I publish through ftp to web.com and other places work exactly as intended, no problems. However, for this one particular host...
0
8182
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, well explore What is ONU, What Is Router, ONU & Routers main usage, and What is the difference between ONU and Router. Lets take a closer look ! Part I. Meaning of...
0
8627
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
8279
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8433
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7093
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development projectplanning, coding, testing, and deploymentwithout human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6088
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupr who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5540
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
1
1747
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
1425
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.