You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by Allen Fowler <al...@yahoo.com> on 2009/05/10 22:54:45 UTC

How to push updates to a development server?

Hello,

I'm sure this is an issue may users have faced:

If I'm developing a web application on my local machine, and I want to quickly test incremental changes on a development server (accessible via ssh/scp/ftp), what's best way to do this?

Probably the solution would involve someway of just uploading the modified files, and ignoring things like temp files and the ".svn" folders....

Any suggestions?

Thank you,
AF

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=2178496

To unsubscribe from this discussion, e-mail: [users-unsubscribe@subversion.tigris.org].

Re: How to push updates to a development server?

Posted by Les Mikesell <le...@gmail.com>.
Allen Fowler wrote:
>>> 2) Windows.  While it may be possible to use rsync under Cygwin, etc,  I'd
>>> rather a more native solution.
>> Have you tried robocopy?
>>
> 
> 
> That's an interesting option,... never heard of it.
> 
> 
> Of course, it's just for windows.
> 
> 
> What i'm looking for is some sort of cross platform Python/Perl/etc script to  take care of this.
> 
> I guess it does not exist.

Probably because you'd likely use cygwin ssh for the cross-platform 
connectivity layer - in which case you might as well just use rsync. 
However, there has been a long-standing bug in rsync where it would hang 
when run under cygwin sshd that may or may not be fixed in the current 
version.  The cygwin rsync version does work well in standalone daemon 
mode or when the comand is issued on the cygwin/windows side (using ssh 
is OK if the remote answering sshd is unix/linux).

Anyway, a pure-perl version of rsync would be a possibility if someone 
wants to do a lot of work.  There is a variation with some additional 
functionality for the backuppc program at 
http://search.cpan.org/dist/File-RsyncP/.  I'm not sure how much it 
would need to be changed to have a standalone mode.

-- 
   Les Mikesell
    lesmikesell@gmail.com

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=2301012

To unsubscribe from this discussion, e-mail: [users-unsubscribe@subversion.tigris.org].

Re: How to push updates to a development server?

Posted by Allen Fowler <al...@yahoo.com>.
> How about using something like ant/nant/maven/rake or other similar tool. They 
> have tasks that will update only changed files, etc.
> 

Hmm....  That's an idea.  

Any specific suggestions for tutorial, etc?

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=2300897

To unsubscribe from this discussion, e-mail: [users-unsubscribe@subversion.tigris.org].

RE: How to push updates to a development server?

Posted by Bob Archer <bo...@amsi.com>.
> > > 2) Windows.  While it may be possible to use rsync under Cygwin, etc,
> I'd
> > > rather a more native solution.
> >
> > Have you tried robocopy?
> >
> 
> 
> That's an interesting option,... never heard of it.
> Of course, it's just for windows.

Well, you did say windows. ;)

> What i'm looking for is some sort of cross platform Python/Perl/etc script
> to  take care of this.
> I guess it does not exist.

How about using something like ant/nant/maven/rake or other similar tool. They have tasks that will update only changed files, etc.

BOb

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=2300874

To unsubscribe from this discussion, e-mail: [users-unsubscribe@subversion.tigris.org].


Re: How to push updates to a development server?

Posted by Allen Fowler <al...@yahoo.com>.
> > 2) Windows.  While it may be possible to use rsync under Cygwin, etc,  I'd
> > rather a more native solution.
> 
> Have you tried robocopy?
> 


That's an interesting option,... never heard of it.


Of course, it's just for windows.


What i'm looking for is some sort of cross platform Python/Perl/etc script to  take care of this.

I guess it does not exist.

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=2300702

To unsubscribe from this discussion, e-mail: [users-unsubscribe@subversion.tigris.org].

RE: How to push updates to a development server?

Posted by Bob Archer <bo...@amsi.com>.
> 2) Windows.  While it may be possible to use rsync under Cygwin, etc,  I'd
> rather a more native solution.

Have you tried robocopy?

BOb

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=2300271

To unsubscribe from this discussion, e-mail: [users-unsubscribe@subversion.tigris.org].


Re: How to push updates to a development server?

Posted by Les Mikesell <le...@gmail.com>.
Allen Fowler wrote:
>>> Am i the only one using SVN for web site / web app  development?
>> Most assuredly not. :)
>>
> 
> That's good to hear.   :)
> 
>  
>> What problems have you encountered with your rsynced export strategy?
>>
> 
> The problems are:
> 
> 1) It requires rsync.  More specifically, it precludes the use of FTP / SFTP.
> 
> 2) Windows.  While it may be possible to use rsync under Cygwin, etc,  I'd rather a more native solution.

But rsync solves many problems that are probably harder to solve other 
ways than it is to drop in the cygwin dll.  For example, it already 
knows how to exclude the svn metadata when your source is a working 
copy, and it always transfers to a temporary filename, renaming only 
when complete so the application never sees an incomplete file.  And 
there is the obvious efficiency of only transferring the changes on each 
run.

-- 
   Les Mikesell
    lesmikesell@gmail.com

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=2296221

To unsubscribe from this discussion, e-mail: [users-unsubscribe@subversion.tigris.org].

Re: How to push updates to a development server?

Posted by Nico Kadel-Garcia <nk...@gmail.com>.
Allen Fowler wrote:
>>> Am i the only one using SVN for web site / web app  development?
>>>       
>> Most assuredly not. :)
>>
>>     
>
> That's good to hear.   :)
>
>  
>   
>> What problems have you encountered with your rsynced export strategy?
>>
>>     
>
> The problems are:
>
> 1) It requires rsync.  More specifically, it precludes the use of FTP / SFTP.
>
> 2) Windows.  While it may be possible to use rsync under Cygwin, etc,  I'd rather a more native solution.
>
>   
Well, you *could* switch to using git, which has a much better "push to 
an active repository that actually has working files in it" model, one 
which also supports the synchronization of tags among multiple, slightly 
distinct repositories.

But rsync can be set up in a reasonably secure fashion with SSH keys and 
a 'validate-rsync' script, along with careful thought about file system 
ownership. And depending on your website requiresments, it might be 
feasible to make the website itself a Subversion repository, with 
'write' access on a secrured channel or even a distinct URL. I've 
actually done that, and used to use 'Amaya' for WebDAV access to 
manipulate it. I had to be careful with PHP scripts to access them over 
a WebDAV enabled channel that didn't try to interpret those as CGI 
scripts for me, but it worked reasonably well.

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=2296160

To unsubscribe from this discussion, e-mail: [users-unsubscribe@subversion.tigris.org].

Re: How to push updates to a development server?

Posted by Allen Fowler <al...@yahoo.com>.
> > Am i the only one using SVN for web site / web app  development?
> 
> Most assuredly not. :)
>

That's good to hear.   :)

 
> What problems have you encountered with your rsynced export strategy?
>

The problems are:

1) It requires rsync.  More specifically, it precludes the use of FTP / SFTP.

2) Windows.  While it may be possible to use rsync under Cygwin, etc,  I'd rather a more native solution.

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=2296133

To unsubscribe from this discussion, e-mail: [users-unsubscribe@subversion.tigris.org].

Re: How to push updates to a development server?

Posted by Ryan Schmidt <su...@ryandesign.com>.
On May 17, 2009, at 14:03, Allen Fowler wrote:

> Right now, I'm using rsync on an exported tree, but I am looking  
> for something a little more compatible.
>
> Am i the only one using SVN for web site / web app  development?

Most assuredly not. :)

Where I used to work, we installed svn on the production web server  
and used "svn up" to pull in updates from the repository. Well, it  
was a bit more complicated than that, but it hinged on having svn  
available on the server. If that's not possible, then you need to  
explore other options.

What problems have you encountered with your rsynced export strategy?

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=2295951

To unsubscribe from this discussion, e-mail: [users-unsubscribe@subversion.tigris.org].

Re: How to push updates to a development server?

Posted by Allen Fowler <al...@yahoo.com>.
Right now, I'm using rsync on an exported tree, but I am looking for something a little more compatible.

Am i the only one using SVN for web site / web app  development?










________________________________
From: Frank Gruman <fg...@verizon.net>
To: Allen Fowler <al...@yahoo.com>
Cc: Gavin Baumanis <ga...@thespidernet.com>; users@subversion.tigris.org
Sent: Monday, May 11, 2009 12:44:38 AM
Subject: Re: How to push updates to a development server?

On Sun, 2009-05-10 at 19:45 -0700, Allen Fowler wrote: 
Yeah, "svn export"ing is probably an overkill.... that would export the entire project.

Something more like rsync, but able to run over whatever transport is available. (ftp, scp, etc.)


I believe the svn export does not require you to pull the entire project.  It takes a URL and exports the contents at that URL to your specified destination or to a folder of the same name you are exporting.

http://svnbook.red-bean.com/en/1.5/svn.ref.svn.c.export.html

A quick test:

fgruman@toybox:~/test> cd mytest/
fgruman@toybox:~/test/mytest> svn add folder1
A         folder1
A         folder1/folder2
A         folder1/folder2/folder3
A         folder1/folder2/folder3/folder4
fgruman@toybox:~/test/mytest> svn ci -m "folder test"
Adding         folder1
Adding         folder1/folder2
Adding         folder1/folder2/folder3
Adding         folder1/folder2/folder3/folder4

Committed revision 1.
fgruman@toybox:~/test/mytest> cd ..
fgruman@toybox:~/test> svn export file:///home/fgruman/mytest/folder1/folder2/folder3
A    folder3
A    folder3/folder4
Exported revision 1.
fgruman@toybox:~/test> ls
folder3  mytest
fgruman@toybox:~/test>

You can even specify a revision.  Either way, you will get the contents of whatever folder you specify.

As noted by a previous poster, you could employ something like "svn list" with the revision created as part of a post-commit hook script that could export only those directories with changed files.  For that matter, I believe svn export will export individual files (I believe as of 1.5), so (if you were really, REALLY desperate) you could take the output of the above list and export every file modified in a given revision.  The problem with this would be the extreme amount of time it would take for large check in operations.

Regards,
Frank

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=2293580

To unsubscribe from this discussion, e-mail: [users-unsubscribe@subversion.tigris.org].

Re: How to push updates to a development server?

Posted by Frank Gruman <fg...@verizon.net>.
On Sun, 2009-05-10 at 19:45 -0700, Allen Fowler wrote:

> Yeah, "svn export"ing is probably an overkill.... that would export the entire project.
> 
> Something more like rsync, but able to run over whatever transport is available. (ftp, scp, etc.)
> 
> 
> 
> 
> > 
> > You can use "svn export" to get our code to a new destination without  
> > the svn metadata.
> > And perhaps a post-commit hook (or even a CRON job to run "svn  
> > export") could see it automated for you. - but that would then force  
> > ALL commits to the dev server which may not necessarily be what you  
> > want.
> > 
> > Gavin.
> > 
> > 
> > On 11/05/2009, at 8:54 AM, Allen Fowler wrote:
> > 
> > > Hello,
> > >
> > > I'm sure this is an issue may users have faced:
> > >
> > > If I'm developing a web application on my local machine, and I want  
> > > to quickly test incremental changes on a development server  
> > > (accessible via ssh/scp/ftp), what's best way to do this?
> > >
> > > Probably the solution would involve someway of just uploading the  
> > > modified files, and ignoring things like temp files and the ".svn"  
> > > folders....
> > >
> > > Any suggestions?
> > >
> > > Thank you,
> > > AF
> > >


I believe the svn export does not require you to pull the entire
project.  It takes a URL and exports the contents at that URL to your
specified destination or to a folder of the same name you are exporting.

http://svnbook.red-bean.com/en/1.5/svn.ref.svn.c.export.html

A quick test:

        fgruman@toybox:~/test> cd mytest/
        fgruman@toybox:~/test/mytest> svn add folder1
        A         folder1
        A         folder1/folder2
        A         folder1/folder2/folder3
        A         folder1/folder2/folder3/folder4
        fgruman@toybox:~/test/mytest> svn ci -m "folder test"
        Adding         folder1
        Adding         folder1/folder2
        Adding         folder1/folder2/folder3
        Adding         folder1/folder2/folder3/folder4
        
        Committed revision 1.
        fgruman@toybox:~/test/mytest> cd ..
        fgruman@toybox:~/test> svn export
        file:///home/fgruman/mytest/folder1/folder2/folder3
        A    folder3
        A    folder3/folder4
        Exported revision 1.
        fgruman@toybox:~/test> ls
        folder3  mytest
        fgruman@toybox:~/test>

You can even specify a revision.  Either way, you will get the contents
of whatever folder you specify.

As noted by a previous poster, you could employ something like "svn
list" with the revision created as part of a post-commit hook script
that could export only those directories with changed files.  For that
matter, I believe svn export will export individual files (I believe as
of 1.5), so (if you were really, REALLY desperate) you could take the
output of the above list and export every file modified in a given
revision.  The problem with this would be the extreme amount of time it
would take for large check in operations.

Regards,
Frank

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=2183323

To unsubscribe from this discussion, e-mail: [users-unsubscribe@subversion.tigris.org].

Re: How to push updates to a development server?

Posted by Andrey Repin <an...@freemail.ru>.
Greetings, Allen Fowler!

>> > I'm sure this is an issue may users have faced:
>> >
>> > If I'm developing a web application on my local machine, and I want  
>> > to quickly test incremental changes on a development server  
>> > (accessible via ssh/scp/ftp), what's best way to do this?
>> >
>> > Probably the solution would involve someway of just uploading the  
>> > modified files, and ignoring things like temp files and the ".svn"  
>> > folders....
>> >
>> > Any suggestions?

>> You can use "svn export" to get our code to a new destination without
>> the svn metadata.
>> And perhaps a post-commit hook (or even a CRON job to run "svn  
>> export") could see it automated for you. - but that would then force  
>> ALL commits to the dev server which may not necessarily be what you  
>> want.

> Yeah, "svn export"ing is probably an overkill.... that would export the entire project.

> Something more like rsync, but able to run over whatever transport is available. (ftp, scp, etc.)

*top-posting fixed*

You can "svn export" on per-file basis. There will be no overhead or wasted
traffic.
Something like
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=1582002


--
WBR,
 Andrey Repin (anrdaemon@freemail.ru) 11.05.2009, <13:40>

Sorry for my terrible english...

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=2187096

To unsubscribe from this discussion, e-mail: [users-unsubscribe@subversion.tigris.org].

Re: How to push updates to a development server?

Posted by Allen Fowler <al...@yahoo.com>.
Yeah, "svn export"ing is probably an overkill.... that would export the entire project.

Something more like rsync, but able to run over whatever transport is available. (ftp, scp, etc.)




> 
> You can use "svn export" to get our code to a new destination without  
> the svn metadata.
> And perhaps a post-commit hook (or even a CRON job to run "svn  
> export") could see it automated for you. - but that would then force  
> ALL commits to the dev server which may not necessarily be what you  
> want.
> 
> Gavin.
> 
> 
> On 11/05/2009, at 8:54 AM, Allen Fowler wrote:
> 
> > Hello,
> >
> > I'm sure this is an issue may users have faced:
> >
> > If I'm developing a web application on my local machine, and I want  
> > to quickly test incremental changes on a development server  
> > (accessible via ssh/scp/ftp), what's best way to do this?
> >
> > Probably the solution would involve someway of just uploading the  
> > modified files, and ignoring things like temp files and the ".svn"  
> > folders....
> >
> > Any suggestions?
> >
> > Thank you,
> > AF
> >
> > ------------------------------------------------------
> > 
> http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=2178496
> >
> > To unsubscribe from this discussion, e-mail: 
> [users-unsubscribe@subversion.tigris.org 
> > ].
> 
> ------------------------------------------------------
> http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=2178988
> 
> To unsubscribe from this discussion, e-mail: 
> [users-unsubscribe@subversion.tigris.org].

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=2181624

To unsubscribe from this discussion, e-mail: [users-unsubscribe@subversion.tigris.org].

Re: How to push updates to a development server?

Posted by Gavin Baumanis <ga...@thespidernet.com>.
Hi Allen,

You can use "svn export" to get our code to a new destination without  
the svn metadata.
And perhaps a post-commit hook (or even a CRON job to run "svn  
export") could see it automated for you. - but that would then force  
ALL commits to the dev server which may not necessarily be what you  
want.

Gavin.


On 11/05/2009, at 8:54 AM, Allen Fowler wrote:

> Hello,
>
> I'm sure this is an issue may users have faced:
>
> If I'm developing a web application on my local machine, and I want  
> to quickly test incremental changes on a development server  
> (accessible via ssh/scp/ftp), what's best way to do this?
>
> Probably the solution would involve someway of just uploading the  
> modified files, and ignoring things like temp files and the ".svn"  
> folders....
>
> Any suggestions?
>
> Thank you,
> AF
>
> ------------------------------------------------------
> http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=2178496
>
> To unsubscribe from this discussion, e-mail: [users-unsubscribe@subversion.tigris.org 
> ].

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=2178988

To unsubscribe from this discussion, e-mail: [users-unsubscribe@subversion.tigris.org].

RE: How to push updates to a development server?

Posted by Bob Archer <bo...@amsi.com>.
> If I'm developing a web application on my local machine, and I want to
> quickly test incremental changes on a development server (accessible via
> ssh/scp/ftp), what's best way to do this?

I do this with a build server like Cruise Control.net with a nant build script (or similar tools). We have a deploy build that send the latest build to our QA server every day. 

BOb

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=2179276

To unsubscribe from this discussion, e-mail: [users-unsubscribe@subversion.tigris.org].


Re: How to push updates to a development server?

Posted by "Mihamina Rakotomandimby (R12y)" <mi...@lab.vectoris.fr>.
On 05/11/2009 01:54 AM, Allen Fowler wrote:
> If I'm developing a web application on my local machine, and I want to
> quickly test incremental changes on a development server (accessible via
> ssh/scp/ftp), what's best way to do this?

I usually SSH login to the demo server, "svn checkout" and then "svn 
update" each time I want to "upload".
That implies to have all the tree of the project (there might be heavy 
binary files) under SVN if wanting this to be easy.

-- 
                              Chef de projet chez Vectoris
                                  Phone: +261 33 11 207 36
System: xUbuntu 8.10 with almost all from package install
    http://www.google.com/search?q=mihamina+rakotomandimby

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=2300433

To unsubscribe from this discussion, e-mail: [users-unsubscribe@subversion.tigris.org].