-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 01.08.2013 13:33, [email protected] wrote:
> Hi folks,
> 
> unfortunately the git Id numer is not a sequential release number
> as in svn but a hash. I find it a good idea to have a release
> number in the code as it was before git migration. A git statement
> generates it:
> 
> git rev-list HEAD | wc -l
> 
> which is the revision number. A better idea would be the gerrit
> number which gives us the last and actual change for that code. It
> is posible to merge such a number to the __version__ header of the
> script instead or in addition to the hash?

I looked this up already. The answer is given in [1] (and more in [3]
and [2]), in short:

1.) You probably don't want to do this. Using git describe is a
reasonable alternative.
2.) If you do need to do this, $Id$ and $Format$ are fairly easy.
3.) Anything more advanced will require using gitattributes and a
custom filter. I provide an example implementation of $Date$.

That was the reason why I activated $Id$ ("fairly easy"). As I
understand, what you want to do (I also would like to see ;) needs
"using gitattributes and a custom filter" in [1] somebody provided an
example implementation of $Date$. I strongly support this, but assmue
we might need to use another keyword than $Id$, e.g. $Rev$ or $Ver$?

[1]
http://stackoverflow.com/questions/39742/does-git-have-anything-like-svn-propset-svnkeywords-or-pre-post-commit-hooks
[2]
http://stackoverflow.com/questions/11534655/git-keyword-substitution-like-those-in-subversion
[3]
http://git-scm.com/book/en/Customizing-Git-Git-Attributes#Keyword-Expansion

Greetings
DrTrigon
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.13 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iEYEARECAAYFAlH6UN0ACgkQAXWvBxzBrDDstQCg3o7VNzYLoARW9VMDAdRkDvCb
1kkAnjTeVifjkMUjtfpd6XCIoVrzeAeZ
=DnmN
-----END PGP SIGNATURE-----

_______________________________________________
Pywikipedia-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l

Reply via email to