You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by Bob Kuo <bo...@marcelmedia.com> on 2008/05/12 18:20:04 UTC
svn diff --summarize vs. svn log
Hello,
I am in the process of writing a script that will one-way sync from a
repository to an FTP server. The idea is that multiple users would make
changes on the repository, and when we wanted those changes on the server,
we would run the script. We would get a list of changes made since the last
revision that was uploaded and then set the ftp client to upload each one of
those changes.
As far as I can tell, there are two ways to get a list of changes between
two revisions: svn diff --summarize and svn log. The problem with svn log
is that it doesn't summarize, that is, a file edited across multiple
revisions will show up multiple times in the log. The problem with svn diff
--summarize is that it doesn't track files that have been moved.
Is there a good way to get this summary information that will track files
that have been moved?
Thanks,
Bob Kuo
Marcel Media
Tel: 312.255.8044 x238
Fax: 866.643.7506
bob@marcelmedia.com
www.marcelmedia.com
Sign up for Marcel Media's Newsletter!
http://marcelmedia.com/newsenewsletter.php
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Re: svn diff --summarize vs. svn log
Posted by Hari Kodungallur <hk...@gmail.com>.
On Mon, May 12, 2008 at 11:20 AM, Bob Kuo <bo...@marcelmedia.com> wrote:
> Hello,
>
> I am in the process of writing a script that will one-way sync from a
> repository to an FTP server. The idea is that multiple users would make
> changes on the repository, and when we wanted those changes on the server,
> we would run the script. We would get a list of changes made since the
> last
> revision that was uploaded and then set the ftp client to upload each one
> of
> those changes.
>
> As far as I can tell, there are two ways to get a list of changes between
> two revisions: svn diff --summarize and svn log. The problem with svn
> log
> is that it doesn't summarize, that is, a file edited across multiple
> revisions will show up multiple times in the log. The problem with svn
> diff
> --summarize is that it doesn't track files that have been moved.
>
> Is there a good way to get this summary information that will track files
> that have been moved?
>
>
I am not aware of any other command as well. Probably best to script around
svn log.
If possible, you could try to get a post-commit hook that incrementally
creates this list of files after every commit. That is another option.
I suppose ftp is a requirement. If not, you could just do an rsync from an
updated working copy to update only the files that have changed.
Regards,
-Hari
Re: svn diff --summarize vs. svn log
Posted by John Peacock <jo...@havurah-software.org>.
Bob Kuo wrote:
> I am in the process of writing a script that will one-way sync from a
> repository to an FTP server. The idea is that multiple users would make
> changes on the repository, and when we wanted those changes on the server,
> we would run the script. We would get a list of changes made since the last
> revision that was uploaded and then set the ftp client to upload each one of
> those changes.
How are you tracking *when* the files are copied up to the FTP server
and who did the copying? How can you roll back an update to a previous
set of files?
I'm asking these leading questions because I think there is a better way
to handle this procedure. Rather than manually make a list of files
that have changed between 'A' and 'B', create a tag and let Subversion
calculate that difference for you. You could even use a post-commit
script which would initiate the file copy when it detected an
appropriately named tag being created. That way you always have a
permanent record of which files were copied and when.
I actually wrote SVN::Notify::Mirror[1] to handle this specific sort of
operation (though it was originally written for updating a dynamic
website). I don't have an FTP transport method at the moment (I only
wrote SSH and RSync), but it shouldn't be hard to write one if you don't
have the ability to use the other two.
John
1. 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