You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by "Manickavel, Senthil" <se...@philips.com> on 2010/02/05 09:57:14 UTC

Q: Changeset between two revisions

Hi,
            I would like to create a changeset between two revisions. I have created a script to do that with svn commands. But this collects all the files in both the revisions. Is it possible for me to collect only the changed file?

Script

REM Create root folder
md Changeset
cd Changeset

REM Collect old revision files.
md %1
cd %1
svn checkout -r %1 %3

REM Collect new revision files.
cd..
md %2
cd %2
svn checkout -r %2 %3

REM Create changed files list
cd..
svn log -r %1:%2 %3 -v > ChangedFiles.txt
cd..

Regards,
Senthil

________________________________
The information contained in this message may be confidential and legally protected under applicable law. The message is intended solely for the addressee(s). If you are not the intended recipient, you are hereby notified that any use, forwarding, dissemination, or reproduction of this message is strictly prohibited and may be unlawful. If you are not the intended recipient, please contact the sender by return e-mail and destroy all copies of the original message.

Re: Collect only the files changed

Posted by Ryan Schmidt <su...@ryandesign.com>.
On Feb 22, 2010, at 08:58, Manickavel, Senthil wrote:

> Is there a way to collect only the files changed between 2 revisions? (without the directories)
> 
> svn diff --summarize -r$FROM_REV:$TO_REV $URL_BASE

"svn diff --summarize" shows you the names of the files that changed. You'll then have to write a script to collect those files.


Collect only the files changed

Posted by "Manickavel, Senthil" <se...@philips.com>.
Hi,
        Is there a way to collect only the files changed between 2 revisions? (without the directories)

svn diff --summarize -r$FROM_REV:$TO_REV $URL_BASE

With Regards,
Senthil

The information contained in this message may be confidential and legally protected under applicable law. The message is intended solely for the addressee(s). If you are not the intended recipient, you are hereby notified that any use, forwarding, dissemination, or reproduction of this message is strictly prohibited and may be unlawful. If you are not the intended recipient, please contact the sender by return e-mail and destroy all copies of the original message.

Re: Q: Changeset between two revisions

Posted by David Weintraub <qa...@gmail.com>.
On Sun, Feb 7, 2010 at 10:09 PM, Manickavel, Senthil
<se...@philips.com> wrote:
> Hi Daniel,
>        This command just gives the list of files changes. My requirements is to collect the
>        files changes list and collect the listed files in both the revisions. Do u have any idea
>        to do this?

Once you get a list of files, you can pass that list through a while
loop and process each file:

svn diff --summarize -r$FROM_REV:$TO_REV $URL_BASE | while read junk file_url
do
    file=${file_url#$URL_BASE/}	#URL REMOVED
    dir=$(dirname $file)
    [ -d "$dir" ] || mkdir -p $dir
    svn cat $file_url 3&>$file
done



-- 
David Weintraub
qazwart@gmail.com

RE: Q: Changeset between two revisions

Posted by "Manickavel, Senthil" <se...@philips.com>.
Hi Daniel,
        This command just gives the list of files changes. My requirements is to collect the files changes list and collect the listed files in both the revisions. Do u have any idea to do this?


With Regards,
Senthil

-----Original Message-----
From: Daniel Widenfalk [mailto:Daniel.Widenfalk@iar.com]
Sent: Friday, February 05, 2010 11:36 PM
To: users@subversion.apache.org
Subject: Re: Q: Changeset between two revisions

Hi,

Manickavel, Senthil wrote:
> Hi,
>             I would like to create a changeset between
 > two revisions. I have created a script to do that with
 > svn commands. But this collects all the files in both
 > the revisions. Is it possible for me to collect only
 > the changed file?
>
> Script
>
> REM Create root folder
> md Changeset
> cd Changeset
>
> REM Collect old revision files.
> md %1
> cd %1
> svn checkout -r %1 %3
>
> REM Collect new revision files.
> cd..
> md %2
> cd %2
> svn checkout -r %2 %3
>
> REM Create changed files list
> cd..
> svn log -r %1:%2 %3 -v > ChangedFiles.txt
> cd..
>
> Regards,
> Senthil

A quick "svn help diff" shows a --summarize option.

Try

   "svn diff -r rev1:rev2 http://URL-to-repo --summarize"

and see if it matches your need. You may need to filter
the output slightly.

Regards
/Daniel



The information contained in this message may be confidential and legally protected under applicable law. The message is intended solely for the addressee(s). If you are not the intended recipient, you are hereby notified that any use, forwarding, dissemination, or reproduction of this message is strictly prohibited and may be unlawful. If you are not the intended recipient, please contact the sender by return e-mail and destroy all copies of the original message.

Re: Q: Changeset between two revisions

Posted by Daniel Widenfalk <Da...@iar.com>.
Hi,

Manickavel, Senthil wrote:
> Hi,
>             I would like to create a changeset between
 > two revisions. I have created a script to do that with
 > svn commands. But this collects all the files in both
 > the revisions. Is it possible for me to collect only
 > the changed file?
> 
> Script
> 
> REM Create root folder
> md Changeset
> cd Changeset
> 
> REM Collect old revision files.
> md %1
> cd %1
> svn checkout -r %1 %3
> 
> REM Collect new revision files.
> cd..
> md %2
> cd %2
> svn checkout -r %2 %3
> 
> REM Create changed files list
> cd..
> svn log -r %1:%2 %3 -v > ChangedFiles.txt
> cd..
> 
> Regards,
> Senthil

A quick "svn help diff" shows a --summarize option.

Try

   "svn diff -r rev1:rev2 http://URL-to-repo --summarize"

and see if it matches your need. You may need to filter
the output slightly.

Regards
/Daniel