commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gilles <>
Subject [Math] Feature development model (Was: big batch of commits coming)
Date Wed, 06 Jan 2016 14:56:30 GMT

I've reread this article (which IIRC was advertised on this list some
time ago):

It is quite clear and I think that it would easy to get used to.
Unless there are shortcomings that would prevent its use with the CM
repository, I propose that we adopt it officially, and assume its
nomenclature in order to eventually develop scripts similar to
what is mentioned below.

Best regards,

On Wed, 6 Jan 2016 14:49:09 +0100, Luc Maisonobe wrote:
> Hi all,
> As discussed a few weeks ago, I ported the new field-based ode 
> feature
> from MATH_3_X to master. I was finally able to do that without losing
> the about hundred commits history, by replaying them with some 
> scripting.
> In case this is of interest for some of you, here is how I managed to
> do that.
> First, I had to find the commit lists in the MATH_3_X branch that
> were of interest, concentrating only on the real code change commits
> (i.e. ignoring the merge commits that occurred two or three time
> between the topic branch field-ode and MATH_3_X branch). This was
> done by identifying a start and an end commit and listing the
> intermediate ones with the following command:
> git rev-list ^4685d03~1 b5276e9 --author=Luc --max-parents=1 
> --reverse
> I put this list in a file for later looping over this.
> Then I wrote a small script that extracted from one commit identifier
> the commit message in one temporary file, and the diff in another
> temporary file, with all math3 strings replaced with math4. The
> diff was then applied, spurious .orig and .rej files eliminated, and
> the commit performed with the same message as the original commit. 
> Here
> are the few commands:
>   git show --pretty=format:"%s%n%n%b" --no-patch $1 \
>        > $tmpdir/commit-message
>   git show --pretty=format:"" $1 | sed 's,math3,math4,g' \
>       > $tmpdir/commit-patch
>   patch -p1 < $tmpdir/commit-patch && |
>     find . -name '*.orig' -exec rm {} \; \
>         -o -name '*.rej'  -exec rm {} \; && \
>     git add . && \
>     git commit -F $tmpdir/commit-message
> It worked quite well, with only a few glitches that forced me to
> interrupt the loop, remove a few commits, correct the command, and
> restart the loop.
> After that, I replayed a number of additional commits picked up
> individually one at a time, for commits that occurred more recently
> than the range before and were interspersed with other commits in
> the MATH_3_X branch. So at the end, I had 101 commits.
> All of this was done on a local tmp branch, so I coud roll back and
> restart from scratch easily if anything went wrong. When I was 
> certain
> that this tmp branch was complete, I merged it into master.
> You will see the last step in a few minutes, with a git push that 
> will
> update master with the 101 commits that are in the pipe. I'm sorry 
> for
> the noise.
> At the end, we will have a master branch with the same feature as the
> MATH_3_X branch, and a full history of the development of this 
> feature.
> best regards,
> Luc

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message