You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Christophe Jaillet <ch...@wanadoo.fr> on 2018/05/27 18:09:24 UTC

Script to instrument a 'svn diff' output to be more useful

Hi,

 From time to time, I try to synch 2.4.x with trunk in order to avoid to 
many differences between the 2. It is just small steps, but it may avoid 
some nightmares when something needs to be backported. To many 
differences lead to merge issue.
So, IMHO, the closest, the better.

I used to do it with a simple 'svn diff' + manual inspection of what 
'looks' easy and safe to backport. Then 'svn blame' to spot the 
corresponding commit, then 'svn merge --dry-run' to see if it can be 
merged as-is.

This is tedious. So today, I wrote a small script that automates most of 
the process. It merges the 'svn diff' with the 'svn blame' output in 
order to have most of the relevant information at the same place.

Then, I can easily find commit numbers, who did it, if other commits 
numbers are around, search in the 2.4.x/trunk diff file...

Very helpful to me (I wanted to write something like that for years).
I think that it could be also useful for others for digging the code 
and/or proposing backports.
It also helps to spot its own pieces of code that have never been 
backported :)


This not httpd specific and it could be used to have a more instrumented 
'svn diff' output to diff two branches of a svn repository.


First, make the 'normal' diff file:
    diff -rup -X httpd_exclude.txt svn_httpd_2.4.x/ 
svn_httpd_trunk_unmodified/ > ~/diff_httpd_2.4.diff

Then:
    ./my_history_httpd_2.4  diff_httpd_2.4.diff  > 
diff_httpd_2.4_with_history.diff

The 'my_history_httpd_2.4' script and the corresponding outputs are 
attached. Enjoy.

Any feedback and/or improvement appreciated.

CJ

Re: Script to instrument a 'svn diff' output to be more useful

Posted by Christophe Jaillet <ch...@wanadoo.fr>.
Le 27/05/2018 à 20:09, Christophe Jaillet a écrit :
> Hi,
> 
>  From time to time, I try to synch 2.4.x with trunk in order to avoid to 
> many differences between the 2. It is just small steps, but it may avoid 
> some nightmares when something needs to be backported. To many 
> differences lead to merge issue.
> So, IMHO, the closest, the better.
> 
> I used to do it with a simple 'svn diff' + manual inspection of what 
> 'looks' easy and safe to backport. Then 'svn blame' to spot the 
> corresponding commit, then 'svn merge --dry-run' to see if it can be 
> merged as-is.
> 
> This is tedious. So today, I wrote a small script that automates most of 
> the process. It merges the 'svn diff' with the 'svn blame' output in 
> order to have most of the relevant information at the same place.
> 
> Then, I can easily find commit numbers, who did it, if other commits 
> numbers are around, search in the 2.4.x/trunk diff file...
> 
> Very helpful to me (I wanted to write something like that for years).
> I think that it could be also useful for others for digging the code 
> and/or proposing backports.
> It also helps to spot its own pieces of code that have never been 
> backported :)
> 
> 
> This not httpd specific and it could be used to have a more instrumented 
> 'svn diff' output to diff two branches of a svn repository.
> 
> 
> First, make the 'normal' diff file:
>     diff -rup -X httpd_exclude.txt svn_httpd_2.4.x/ 
> svn_httpd_trunk_unmodified/ > ~/diff_httpd_2.4.diff
> 
> Then:
>     ./my_history_httpd_2.4  diff_httpd_2.4.diff  > 
> diff_httpd_2.4_with_history.diff
> 
> The 'my_history_httpd_2.4' script and the corresponding outputs are 
> attached. Enjoy.
> 
> Any feedback and/or improvement appreciated.
> 
> CJ
Forgot to also attach my httpd_exclude.txt list.

CJ