You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by Luc Maisonobe <lu...@spaceroots.org> on 2014/09/22 14:23:40 UTC

[math] Removal of subversion keywords expansion

Hi all,

Le 22/09/2014 14:07, luc@apache.org a écrit :
> Removed subversion keywords $Id$, $Revision$ and $Date$.
> 
> Git does not support subversion keywords expansion.
> 
> Project: http://git-wip-us.apache.org/repos/asf/commons-math/repo
> Commit: http://git-wip-us.apache.org/repos/asf/commons-math/commit/abffaf33
> Tree: http://git-wip-us.apache.org/repos/asf/commons-math/tree/abffaf33
> Diff: http://git-wip-us.apache.org/repos/asf/commons-math/diff/abffaf33
> 
> Branch: refs/heads/keywords-expansion-removal
> Commit: abffaf334c4302047e013a112c286a9e4d2c967e
> Parents: 3cbfe27
> Author: Luc Maisonobe <lu...@apache.org>
> Authored: Mon Sep 22 14:02:52 2014 +0200
> Committer: Luc Maisonobe <lu...@apache.org>
> Committed: Mon Sep 22 14:02:52 2014 +0200
> 
> ----------------------------------------------------------------------
>  build.xml                                                      | 2 --
>  checkstyle.xml                                                 | 6 ++----
>  math-RC.sh                                                     | 1 -
>  math-pre-RC.sh                                                 | 1 -
>  src/main/java/org/apache/commons/math3/Field.java              | 1 -
>  src/main/java/org/apache/commons/math3/FieldElement.java       | 1 -
>  src/main/java/org/apache/commons/math3/RealFieldElement.java   | 1 -
>  .../org/apache/commons/math3/analysis/BivariateFunction.java   | 1 -
>  .../math3/analysis/DifferentiableMultivariateFunction.java     | 1 -
>  .../analysis/DifferentiableMultivariateVectorFunction.java     | 1 -
>  .../math3/analysis/DifferentiableUnivariateFunction.java       | 1 -

[snip]

This large commit in [math] has been done in a new feature branch named
keywords-expansion-removal (it appears in the header above). This means
that it is not yet in the master branch. I wanted to discuss about it
before merging this branch back to master.

The reason of this commit is that Git does not support subversion
keyword expansion. As mentioned a few weeks earlier, there is no
replacement in Git for these keywords, and in fact Git does not
recommand such behaviour. Si I completely removed the keywords, and
updated our checkstyle.xml configuration to not look for them anymore.

I am however not sure everyone will be happy with this change, so I
would like to discuss it with you here.

Keywords expansion has always been a difficult problem, as it modifies
files between the repository and the developers workspace. As an example
of the problem, we had to remove the $Date$ keyword and stick with $Id$
only since $Date$ depended on the timezone and language of the
developer. So from the exact same version of the same repository file I
would have extracted something different from someone working in
Australia for example. This was a nuisance for comparing releases.

I do consider that getting rid of these keywords expansion completely is
a good thing. When we release source, it is not a bunch of independent
files, but a consistent set. The individual version of each file is
irrelevant and what is important to us is the global version of the
source tree: this is what Git (and subversion) give us. So what we
really check when we vote for a release is not each file independently,
but the source tree from the signed release archive with respect to the
tag in the source code management system, using a big diff command. For
this very important check, keywords expansion is irrelevant. This check
can still be done (and we *must* still do it on release of course),
without the keywords.

Do you agree with this? Can I merge the keywords-expansion-removal
branch back to master branch?

best regards,
Luc

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org


Re: [math] Removal of subversion keywords expansion

Posted by Luc Maisonobe <lu...@spaceroots.org>.
Hi Gilles,

Le 22/09/2014 14:40, Gilles a écrit :
> Hi Luc.
> 
> 
>> [...]
>>
>> I am however not sure everyone will be happy with this change, so I
>> would like to discuss it with you here.
>>
> 
> Is there an alternative to removing SVN keywords?  I mean, if they
> are now useless, what's the point of a discussion about keeping
> them?  [I.e. (IIUC) we implicitly agreed to remove them once we
> agreed to use "git".]

There are ways to hack something, but it seems really dirty and involves
scripting and modifying files on the fly (some customized filter hooks).
See for example
<http://stackoverflow.com/questions/62264/dealing-with-svn-keyword-expansion-with-git-svn>
and <https://github.com/turon/git-rcs-keywords>. These are perl scripts
that must be installed on all developers machines (I guess the original
scripts work on Linux but not Windows). We have more than one thousand
files, and scripting something on all files would probably be very slow,
as discussed in the stackoverflow thread.

So I would prefer to not try this and simply trust what we have always
done for release: check the full repository tree against the released
archive. As I am not the only one here, I would like to get a consensus
on this topic.

Luc

> 
>> [...]
> 
> Best,
> Gilles
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
> For additional commands, e-mail: dev-help@commons.apache.org
> 
> 
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org


Re: [math] Removal of subversion keywords expansion

Posted by Gilles <gi...@harfang.homelinux.org>.
Hi Luc.


> [...]
>
> I am however not sure everyone will be happy with this change, so I
> would like to discuss it with you here.
>

Is there an alternative to removing SVN keywords?  I mean, if they
are now useless, what's the point of a discussion about keeping
them?  [I.e. (IIUC) we implicitly agreed to remove them once we
agreed to use "git".]

> [...]

Best,
Gilles


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org


Re: [math] Removal of subversion keywords expansion

Posted by Gary Gregory <ga...@gmail.com>.
+1, it's the Git way, so keywords begone.

Gary

On Mon, Sep 22, 2014 at 8:23 AM, Luc Maisonobe <lu...@spaceroots.org> wrote:

> Hi all,
>
> Le 22/09/2014 14:07, luc@apache.org a écrit :
> > Removed subversion keywords $Id$, $Revision$ and $Date$.
> >
> > Git does not support subversion keywords expansion.
> >
> > Project: http://git-wip-us.apache.org/repos/asf/commons-math/repo
> > Commit:
> http://git-wip-us.apache.org/repos/asf/commons-math/commit/abffaf33
> > Tree: http://git-wip-us.apache.org/repos/asf/commons-math/tree/abffaf33
> > Diff: http://git-wip-us.apache.org/repos/asf/commons-math/diff/abffaf33
> >
> > Branch: refs/heads/keywords-expansion-removal
> > Commit: abffaf334c4302047e013a112c286a9e4d2c967e
> > Parents: 3cbfe27
> > Author: Luc Maisonobe <lu...@apache.org>
> > Authored: Mon Sep 22 14:02:52 2014 +0200
> > Committer: Luc Maisonobe <lu...@apache.org>
> > Committed: Mon Sep 22 14:02:52 2014 +0200
> >
> > ----------------------------------------------------------------------
> >  build.xml                                                      | 2 --
> >  checkstyle.xml                                                 | 6
> ++----
> >  math-RC.sh                                                     | 1 -
> >  math-pre-RC.sh                                                 | 1 -
> >  src/main/java/org/apache/commons/math3/Field.java              | 1 -
> >  src/main/java/org/apache/commons/math3/FieldElement.java       | 1 -
> >  src/main/java/org/apache/commons/math3/RealFieldElement.java   | 1 -
> >  .../org/apache/commons/math3/analysis/BivariateFunction.java   | 1 -
> >  .../math3/analysis/DifferentiableMultivariateFunction.java     | 1 -
> >  .../analysis/DifferentiableMultivariateVectorFunction.java     | 1 -
> >  .../math3/analysis/DifferentiableUnivariateFunction.java       | 1 -
>
> [snip]
>
> This large commit in [math] has been done in a new feature branch named
> keywords-expansion-removal (it appears in the header above). This means
> that it is not yet in the master branch. I wanted to discuss about it
> before merging this branch back to master.
>
> The reason of this commit is that Git does not support subversion
> keyword expansion. As mentioned a few weeks earlier, there is no
> replacement in Git for these keywords, and in fact Git does not
> recommand such behaviour. Si I completely removed the keywords, and
> updated our checkstyle.xml configuration to not look for them anymore.
>
> I am however not sure everyone will be happy with this change, so I
> would like to discuss it with you here.
>
> Keywords expansion has always been a difficult problem, as it modifies
> files between the repository and the developers workspace. As an example
> of the problem, we had to remove the $Date$ keyword and stick with $Id$
> only since $Date$ depended on the timezone and language of the
> developer. So from the exact same version of the same repository file I
> would have extracted something different from someone working in
> Australia for example. This was a nuisance for comparing releases.
>
> I do consider that getting rid of these keywords expansion completely is
> a good thing. When we release source, it is not a bunch of independent
> files, but a consistent set. The individual version of each file is
> irrelevant and what is important to us is the global version of the
> source tree: this is what Git (and subversion) give us. So what we
> really check when we vote for a release is not each file independently,
> but the source tree from the signed release archive with respect to the
> tag in the source code management system, using a big diff command. For
> this very important check, keywords expansion is irrelevant. This check
> can still be done (and we *must* still do it on release of course),
> without the keywords.
>
> Do you agree with this? Can I merge the keywords-expansion-removal
> branch back to master branch?
>
> best regards,
> Luc
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
> For additional commands, e-mail: dev-help@commons.apache.org
>
>


-- 
E-Mail: garydgregory@gmail.com | ggregory@apache.org
Java Persistence with Hibernate, Second Edition
<http://www.manning.com/bauer3/>
JUnit in Action, Second Edition <http://www.manning.com/tahchiev/>
Spring Batch in Action <http://www.manning.com/templier/>
Blog: http://garygregory.wordpress.com
Home: http://garygregory.com/
Tweet! http://twitter.com/GaryGregory