You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by "Zhang, Wei-Jovi (NSN - CN/Hangzhou)" <we...@nsn.com> on 2010/12/20 03:17:29 UTC

[Question] Svn log show code diff

Hi,
	I have a question about svn log command, every time when I use
svn log command, I'm very upset that I need to input svn diff to check
changesets using revision number.
	Why not combine svn log and diff command together? Or is there
have any script for this purpose? Like this:


------------------------------------------------------------------------
r229 | w3zhang | 2010-12-15 10:48:20 +0800 (Wed, 15 Dec 2010) | 1 line
Changed paths:
   M /trunk/SS_MGWSemiPermCtrl/src/semipermanent_heathcheck.sh

Index: semipermanent_heathcheck.sh
===================================================================
--- semipermanent_heathcheck.sh (revision 228)
+++ semipermanent_heathcheck.sh (revision 229)
@@ -75,6 +75,7 @@
     if [ "$RET_STATUS" != "" ]; then
         echo -e "add tdm-tdm crct1:\t$CRCT1-$TSL \tcrct2:\t$CRCT2-$TSL
\t[FAILED]"
         CRCT_CREATE_FAILED="$CRCT1-$TSL $CRCT2-$TSL"
+        echo -e "command: fsclish -c \"add tdm semipermanent-connection
tdm-tdm crct1 $CRCT1-$TSL crct2 $CRCT2-$TSL\""
         echo -e "$RET_STATUS"
         break
     else
semipermanent_heathcheck: echo failed command, used for re-executed
later

------------------------------------------------------------------------
r227 | w3zhang | 2010-12-14 16:59:23 +0800 (Tue, 14 Dec 2010) | 1 line
Changed paths:
   M /trunk/SS_MGWSemiPermCtrl/src/semper_h01.sdl
   M /trunk/SS_MGWSemiPermCtrl/src/semper_h02.sdl
   M /trunk/SS_MGWSemiPermCtrl/src/semper_leg.sdl
   M /trunk/SS_MGWSemiPermCtrl/src/semper_m01.sdl
   M /trunk/SS_MGWSemiPermCtrl/src/semper_m02.sdl
   M /trunk/SS_MGWSemiPermCtrl/src/semper_mas.sdl
   M /trunk/SS_MGWSemiPermCtrl/src/z00lib.sdl

using script to cleanup TNSDL coding style

Index: semipermanent_heathcheck.sh
===================================================================
--- semipermanent_heathcheck.sh (revision 228)
+++ semipermanent_heathcheck.sh (revision 229)
@@ -93,6 +94,7 @@
     if [ "$RET_STATUS" != "" ]; then
         echo -e "delete tdm-tdm crct1:\t$CRCT1-$TSL
\tcrct2:\t$CRCT2-$TSL \t[FAILED]"
         CRCT_DELETE_FAILED="$CRCT_DELETE_FAILED $CRCT1-$TSL
$CRCT2-$TSL"
+        echo -e "command: fsclish -c \"delete tdm
semipermanent-connection tdm-tdm crct $CRCT1-$TSL\""
         echo -e "$RET_STATUS"
     else
         echo -e "delete tdm-tdm crct1:\t$CRCT1-$TSL \tcrct2:
\t$CRCT2-$TSL \t[OK]"



	Thanks for your time.




Re: [Question] Svn log show code diff

Posted by Kamesh Jayachandran <ka...@collab.net>.
Hi Zhang,

This feature is already available via  "--diff                   : 
produce diff output" option log command in upcoming svn 1.7.


With regards
Kamesh Jayachandran

On 12/20/2010 08:47 AM, Zhang, Wei-Jovi (NSN - CN/Hangzhou) wrote:
> Hi,
> 	I have a question about svn log command, every time when I use
> svn log command, I'm very upset that I need to input svn diff to check
> changesets using revision number.
> 	Why not combine svn log and diff command together? Or is there
> have any script for this purpose? Like this:
>
>
> ------------------------------------------------------------------------
> r229 | w3zhang | 2010-12-15 10:48:20 +0800 (Wed, 15 Dec 2010) | 1 line
> Changed paths:
>     M /trunk/SS_MGWSemiPermCtrl/src/semipermanent_heathcheck.sh
>
> Index: semipermanent_heathcheck.sh
> ===================================================================
> --- semipermanent_heathcheck.sh (revision 228)
> +++ semipermanent_heathcheck.sh (revision 229)
> @@ -75,6 +75,7 @@
>       if [ "$RET_STATUS" != "" ]; then
>           echo -e "add tdm-tdm crct1:\t$CRCT1-$TSL \tcrct2:\t$CRCT2-$TSL
> \t[FAILED]"
>           CRCT_CREATE_FAILED="$CRCT1-$TSL $CRCT2-$TSL"
> +        echo -e "command: fsclish -c \"add tdm semipermanent-connection
> tdm-tdm crct1 $CRCT1-$TSL crct2 $CRCT2-$TSL\""
>           echo -e "$RET_STATUS"
>           break
>       else
> semipermanent_heathcheck: echo failed command, used for re-executed
> later
>
> ------------------------------------------------------------------------
> r227 | w3zhang | 2010-12-14 16:59:23 +0800 (Tue, 14 Dec 2010) | 1 line
> Changed paths:
>     M /trunk/SS_MGWSemiPermCtrl/src/semper_h01.sdl
>     M /trunk/SS_MGWSemiPermCtrl/src/semper_h02.sdl
>     M /trunk/SS_MGWSemiPermCtrl/src/semper_leg.sdl
>     M /trunk/SS_MGWSemiPermCtrl/src/semper_m01.sdl
>     M /trunk/SS_MGWSemiPermCtrl/src/semper_m02.sdl
>     M /trunk/SS_MGWSemiPermCtrl/src/semper_mas.sdl
>     M /trunk/SS_MGWSemiPermCtrl/src/z00lib.sdl
>
> using script to cleanup TNSDL coding style
>
> Index: semipermanent_heathcheck.sh
> ===================================================================
> --- semipermanent_heathcheck.sh (revision 228)
> +++ semipermanent_heathcheck.sh (revision 229)
> @@ -93,6 +94,7 @@
>       if [ "$RET_STATUS" != "" ]; then
>           echo -e "delete tdm-tdm crct1:\t$CRCT1-$TSL
> \tcrct2:\t$CRCT2-$TSL \t[FAILED]"
>           CRCT_DELETE_FAILED="$CRCT_DELETE_FAILED $CRCT1-$TSL
> $CRCT2-$TSL"
> +        echo -e "command: fsclish -c \"delete tdm
> semipermanent-connection tdm-tdm crct $CRCT1-$TSL\""
>           echo -e "$RET_STATUS"
>       else
>           echo -e "delete tdm-tdm crct1:\t$CRCT1-$TSL \tcrct2:
> \t$CRCT2-$TSL \t[OK]"
>
>
>
> 	Thanks for your time.
>
>
>
>

RE: [Question] Svn log show code diff

Posted by "Zhang, Wei-Jovi (NSN - CN/Hangzhou)" <we...@nsn.com>.
Hi,
	Thanks very much for your answer. I get it.

.jovi 

-----Original Message-----
From: ext Ryan Schmidt [mailto:subversion-2010d@ryandesign.com] 
Sent: Monday, December 20, 2010 10:02 PM
To: Zhang, Wei-Jovi (NSN - CN/Hangzhou)
Cc: Subversion Users
Subject: Re: [Question] Svn log show code diff

I'm removing dev@ from the Cc, since this is a question about how to use
Subversion, and not a discussion about its development.


On Dec 19, 2010, at 21:17, Zhang, Wei-Jovi (NSN - CN/Hangzhou) wrote:

>         I have a question about svn log command, every time when I use
svn log command, I'm very upset that I need to input svn diff to check
changesets using revision number.
> 
>         Why not combine svn log and diff command together? Or is there
have any script for this purpose? Like this:

I'm sorry this upsets you, but in Subversion, log and diff are separate
commands.

It's common for a Subversion administrator to set up their repository in
such a way that any commit automatically generates an email to a mailing
list, by calling a mailing script in the post-commit hook. There are a
number of existing scripts available to do this. Typically each commit
email includes the log message and the diff. Mailing list software often
includes a web archive feature. This method might be a different way to
meet your goal.

An additional alternative to consider would be for the post-commit hook
to publish the log message and diff to an RSS feed.

If that's not sufficient, and you need the flexibility of specifying any
of the various arguments that "svn log" accepts for limiting the range
of revisions, it should be possible for you to write a script to combine
the log and diff output.



Re: [Question] Svn log show code diff

Posted by Daniel Shahaf <d....@daniel.shahaf.name>.
Ryan Schmidt wrote on Mon, Dec 20, 2010 at 08:01:40 -0600:
> I'm removing dev@ from the Cc, since this is a question about how to use Subversion, and not a discussion about its development.
> 

+1

> 
> On Dec 19, 2010, at 21:17, Zhang, Wei-Jovi (NSN - CN/Hangzhou) wrote:
> 
> >         I have a question about svn log command, every time when I use svn log command, I'm very upset that I need to input svn diff to check changesets using revision number.
> > 
> >         Why not combine svn log and diff command together? Or is there have any script for this purpose? Like this:
> 
> I'm sorry this upsets you, but in Subversion, log and diff are separate commands.
> 
> It's common for a Subversion administrator to set up their repository in such a way that any commit automatically generates an email to a mailing list, by calling a mailing script in the post-commit hook. There are a number of existing scripts available to do this. Typically each commit email includes the log message and the diff. Mailing list software often includes a web archive feature. This method might be a different way to meet your goal.
> 
> An additional alternative to consider would be for the post-commit hook to publish the log message and diff to an RSS feed.
> 
> If that's not sufficient, and you need the flexibility of specifying any of the various arguments that "svn log" accepts for limiting the range of revisions, it should be possible for you to write a script to combine the log and diff output.

There is tools/client-side/showchange.pl in trunk.

svn 1.7 will have 'svn log --diff'.

Re: [Question] Svn log show code diff

Posted by Ryan Schmidt <su...@ryandesign.com>.
I'm removing dev@ from the Cc, since this is a question about how to use Subversion, and not a discussion about its development.


On Dec 19, 2010, at 21:17, Zhang, Wei-Jovi (NSN - CN/Hangzhou) wrote:

>         I have a question about svn log command, every time when I use svn log command, I'm very upset that I need to input svn diff to check changesets using revision number.
> 
>         Why not combine svn log and diff command together? Or is there have any script for this purpose? Like this:

I'm sorry this upsets you, but in Subversion, log and diff are separate commands.

It's common for a Subversion administrator to set up their repository in such a way that any commit automatically generates an email to a mailing list, by calling a mailing script in the post-commit hook. There are a number of existing scripts available to do this. Typically each commit email includes the log message and the diff. Mailing list software often includes a web archive feature. This method might be a different way to meet your goal.

An additional alternative to consider would be for the post-commit hook to publish the log message and diff to an RSS feed.

If that's not sufficient, and you need the flexibility of specifying any of the various arguments that "svn log" accepts for limiting the range of revisions, it should be possible for you to write a script to combine the log and diff output.