You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by David Aldrich <Da...@EU.NEC.COM> on 2008/07/31 08:12:00 UTC

Advice sought on how to diff and commit multiple files

Hi

We are developing an application based on a project developed by a third party. That 'base' project consists of drivers and infrastructure code. Both we and the third party develop using SVN but it is likely that we won't be allowed access to the third party's repository. Instead, they will send use releases of the entire base project as zip files. We will then have to identify the files that have changed and commit only those to our repository (which contains both the base project and the application).

If the dates of unchanged files remain identical between releases I guess this would be a simple matter of copying the zip file to a local working copy here. The SVN client should then identify the files that have changed by time comparison.

However, I am not sure that the dates of unchanged files will be identical. Therefore, I think it would be safer to diff the contents of each file to identify changes and then commit. I guess this would require a script (certainly it couldn't be done manually because of the large number of files). So I would like to ask for advice on how to go about this. Am I likely to be able to find an existing script that would do this for me or must I write it myself?

I am working under Windows and am proficient in C++ but not Python or Perl.

Best regards

David

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


Re: Advice sought on how to diff and commit multiple files

Posted by Paul Dhaliwal <su...@gmail.com>.
I have also used something with WinMerge to visually diff identical folder
structures. It might help you here.

Paul


On Thu, Jul 31, 2008 at 1:12 AM, David Aldrich <Da...@eu.nec.com>wrote:

> Hi
>
> We are developing an application based on a project developed by a third
> party. That 'base' project consists of drivers and infrastructure code. Both
> we and the third party develop using SVN but it is likely that we won't be
> allowed access to the third party's repository. Instead, they will send use
> releases of the entire base project as zip files. We will then have to
> identify the files that have changed and commit only those to our repository
> (which contains both the base project and the application).
>
> If the dates of unchanged files remain identical between releases I guess
> this would be a simple matter of copying the zip file to a local working
> copy here. The SVN client should then identify the files that have changed
> by time comparison.
>
> However, I am not sure that the dates of unchanged files will be identical.
> Therefore, I think it would be safer to diff the contents of each file to
> identify changes and then commit. I guess this would require a script
> (certainly it couldn't be done manually because of the large number of
> files). So I would like to ask for advice on how to go about this. Am I
> likely to be able to find an existing script that would do this for me or
> must I write it myself?
>
> I am working under Windows and am proficient in C++ but not Python or Perl.
>
> Best regards
>
> David
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
> For additional commands, e-mail: users-help@subversion.tigris.org
>
>

RE: Advice sought on how to diff and commit multiple files

Posted by David Aldrich <Da...@EU.NEC.COM>.
Hi Ryan

> Keeping unmodified vendor code in /vendor is a standard of
> sorts in that it is described in the book. By doing it that
> way, you make it easier for developers new to your
> organization to understand. Same goes for when you need to
> ask for help on this mailing list. It will be a setup that
> others are already familiar with.

Sounds a good reason to me. Thanks!

David

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


Re: Advice sought on how to diff and commit multiple files

Posted by Ryan Schmidt <su...@ryandesign.com>.
On Jul 31, 2008, at 04:51, David Aldrich wrote:

>> You will want to use svn_load_dirs.pl to load their code into
>> a folder in the /vendor directory in your repository. You
>> will then want to make a copy of their code to another
>> location in your repository, which is where you will modify
>> their code as needed. When you load new versions of their
>> code into /vendor, you can then merge their changes into your
>> version using svn merge. See the Book:
>
> Thanks very much for pointing me towards vendor branches. I have  
> now carefully read that section and would be happy to work that way.
>
> Somebody else suggested I simply explode the vendor's zip in a  
> branch of my project, resolve any conflicts there and then merge  
> into my trunk. This misses out the vendor branch stage - all  
> storage is in the application directory. What is the advantage of  
> using the more general solution of the vendor branch?

Keeping unmodified vendor code in /vendor is a standard of sorts in  
that it is described in the book. By doing it that way, you make it  
easier for developers new to your organization to understand. Same  
goes for when you need to ask for help on this mailing list. It will  
be a setup that others are already familiar with.


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

RE: Advice sought on how to diff and commit multiple files

Posted by David Aldrich <Da...@EU.NEC.COM>.
Hi Ryan

> You will want to use svn_load_dirs.pl to load their code into
> a folder in the /vendor directory in your repository. You
> will then want to make a copy of their code to another
> location in your repository, which is where you will modify
> their code as needed. When you load new versions of their
> code into /vendor, you can then merge their changes into your
> version using svn merge. See the Book:

Thanks very much for pointing me towards vendor branches. I have now carefully read that section and would be happy to work that way.

Somebody else suggested I simply explode the vendor's zip in a branch of my project, resolve any conflicts there and then merge into my trunk. This misses out the vendor branch stage - all storage is in the application directory. What is the advantage of using the more general solution of the vendor branch?

David

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


Re: Advice sought on how to diff and commit multiple files

Posted by Ryan Schmidt <su...@ryandesign.com>.
On Jul 31, 2008, at 03:12, David Aldrich wrote:

> We are developing an application based on a project developed by a  
> third party. That 'base' project consists of drivers and  
> infrastructure code. Both we and the third party develop using SVN  
> but it is likely that we won't be allowed access to the third  
> party's repository. Instead, they will send use releases of the  
> entire base project as zip files. We will then have to identify the  
> files that have changed and commit only those to our repository  
> (which contains both the base project and the application).
>
> If the dates of unchanged files remain identical between releases I  
> guess this would be a simple matter of copying the zip file to a  
> local working copy here. The SVN client should then identify the  
> files that have changed by time comparison.
>
> However, I am not sure that the dates of unchanged files will be  
> identical. Therefore, I think it would be safer to diff the  
> contents of each file to identify changes and then commit. I guess  
> this would require a script (certainly it couldn't be done manually  
> because of the large number of files). So I would like to ask for  
> advice on how to go about this. Am I likely to be able to find an  
> existing script that would do this for me or must I write it myself?
>
> I am working under Windows and am proficient in C++ but not Python  
> or Perl.

Hi David.

You will want to use svn_load_dirs.pl to load their code into a  
folder in the /vendor directory in your repository. You will then  
want to make a copy of their code to another location in your  
repository, which is where you will modify their code as needed. When  
you load new versions of their code into /vendor, you can then merge  
their changes into your version using svn merge. See the Book:

http://svnbook.red-bean.com/en/1.4/svn.advanced.vendorbr.html




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