yade-dev team mailing list archive
-
yade-dev team
-
Mailing list archive
-
Message #01012
signing files automatically...
-
To:
yade-dev@xxxxxxxxxxxxxxxxxxx
-
From:
Janek Kozicki <janek_listy@xxxxx>
-
Date:
Mon, 23 Feb 2009 00:31:53 +0100
-
Face:
iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAALVBMVEUBAQEtLS1KSkpRUVFXV1dYWFhjY2Nzc3N3d3eHh4eKioqdnZ24uLjLy8vc3NxVIagyAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH2AIVEzgS1fgQtQAAAjRJREFUOMtt1DFv00AUAOAzFQNbjigSyoQaRaBMhKgLUyKXpVNNeUpk9vyDqFJhQ1kiBuaqAwJCqvPtSLY7RlTn5+5IdnYkkt/AOyfxXVLe5vf53Z1875kd34tOEax8djmj6GyjhB5bxz50GdsVZr9fqRjZwAtKOJw5Wqs2MMZ16ALHsaDncF7xAHix1oEFHAB8f+pRjcO4gfZDykcYzbiucRolOLUJ6kjA0xtVt+A6TySlM0RajIpK6DzwKZ/nOYbF/gclHMo1ZOHYY/+Ha+AWuM+3oMS4eeqYzZ8FiCltgUqI8cd2wwAVpJk+8LWYjBtnJdQpHQqJMd4Oxt4bU9ESiFGc5hkqaH74asAX4iabP5I5gZ+qjgGlJCqZa3h3lxhoeVcSE1qLQC4sqKOK9MGW9E3izFqqHokoztLFEgXg31sbZEKnWi2T74A4NxfVQqlkjKtcAWD+zcArFEES01dR0E/nnV0IgugmDd/2L84sOAouRBBHEc7gtc8teDkRlE0iNQPo2w3Xhh/D4TCIQ4LRLoTvgwjj6RRgavdurxYGMaIuGOyAW/PpNlCcU9/93AHenAWYjPoAwa+G3e3to/MgFNTAEKvKDjzuCzHTnY3qqdXtx24VijzQfZ0yewZ5cwRFQaa+mIYr1uI0I76+3W4xhlvoVRwOA0Fdl64HlJnxP6T8YpX/Lga4Wv4A3ErrU5oTfN7Mu/llXMl8RXEPji/lQkN3H7qXqgC2By47EXeU/7PJ/wPxRKMnuZwIeAAAAABJRU5ErkJggg==
Everyone knows `svn blame`, now this command:
svn blame core/MetaBody.hpp | awk '{print $2}'
Or better, this one :)
svn blame core/MetaBody.hpp | awk '{print $2}' | sort | uniq -c
Or even better, lets sort according to number of lines modified by
each person:
svn blame core/MetaBody.hpp | awk '{print $2}' | sort | uniq -c | sort -rn
Now, we can automatically update all files, just replace people's
usernames with their real names and emails (I just committed AUTHORS
file for that), like this:
svn blame core/MetaBody.hpp | awk '{print $2}' | sort | uniq -c | \
sort -rn | awk '{print $2}' | \
xargs -n 1 -I person fgrep person AUTHORS | sed -e 's/\(.*\)/* (C)\1 */'
And you will get output like this:
* (C) Vaclav Smilauer <eudoxos@xxxxxxxxxx> *
* (C) Janek Kozicki <cosurgi@xxxxxxxxxx> *
* (C) Olivier Galizzi <galizzi@xxxxxxxxxx> *
* (C) Vincent Richefeu <richefeu@xxxxxxxxxx> *
* (C) Sergei Dorofeenko <sega@xxxxxxxxxx> *
So we can update "Authors" part of files by writing a simple script
that will parse `svn blame` output and replace the current long-outdated
file headers, like this one from MetaBody.hpp:
/*************************************************************************
* Copyright (C) 2004 by Olivier Galizzi *
* olivier.galizzi@xxxxxxx *
* Copyright (C) 2004 by Janek Kozicki *
* cosurgi@xxxxxxxxxx *
* *
* This program is free software; it is licensed under the terms of the *
* GNU General Public License v2 or later. See file LICENSE for details. *
*************************************************************************/
with something like that:
/*************************************************************************
* (C) Vaclav Smilauer <eudoxos@xxxxxxxxxx> *
* (C) Janek Kozicki <cosurgi@xxxxxxxxxx> *
* (C) Olivier Galizzi <galizzi@xxxxxxxxxx> *
* (C) Vincent Richefeu <richefeu@xxxxxxxxxx> *
* (C) Sergei Dorofeenko <sega@xxxxxxxxxx> *
* *
* This program is free software; it is licensed under the terms of the *
* GNU General Public License v2 or later. See file LICENSE for details. *
*************************************************************************/
Just run such script from time to time on all files, and we are done.
I didn't write this script ;) But in this email you already have the
most interesting part - parsing `svn blame` output :)
--
Janek Kozicki |