Hi John,
I am happy that your are working on it and have some nice results.
John LeMoyne Castle píše v Pá 24. 06. 2011 v 02:38 -0700:
Hi Petr,
Sorry about the confusion I created on a previous summary thread in my
brainstorming attempt to get development summaries into the wiki.
I know it was bad because it even seemed to infect your response a little.
I am not aware of any confusion. It is normal to have different views on
something and exchange ideas :-)
This should be clearer.
Here is an example of a wrapper (wiki-dev-sum)
http://nabble.documentfoundation.org/file/n3103449/wiki-dev-sum wiki-dev-sum
OK, if I understand it correctly, it has the following purpose:
1. purpose is to generate the statistic for all active branches.
Well, this might make sense. I actually use a similar
wrapper that updates the repository to a given branch
and get the last changes. It is written in bash. Please,
find it attached.
It would be great to pass the list of branches via the
command line options.
You could use --option=param even in bash. You could get
the param via:
param=`echo $arg | sed s/--option=//`
Note that the situation is a bit complicated. I have separate
git tree for master, libreoffice-3-4* and libreoffice-3-3*
branches because they are not compatible:
+ libreoffice-3-3 uses build repo as the
toplevel dir ; bootstrap repo is in
build/clone/bootstrap.
+ libreoffice-3-4 uses bootstrap as the top level
module
+ master is going to be switched to single git
repository, see
http://wiki.documentfoundation.org/Development/One_Git_Conversion
Well, it might be interesting to move this functionality to
the lo-commit-stat script. You could add new option:
--branches=branch[,...]
I created extra wrapper because it was easier to do it in
bash and I wanted a quick solution ;-)
2. purpose is to define the start and end day according to the
week.
It would be great to have it in the lo-commit-stat script. It
is very useful also for generating the plain log for E-mail.
Could you please add --year=year --week=week --last-week
options int lo-commit-stat? You could do something like:
if (defined $last_week) {
$year = get_this_year();
$week = get_this_week();
}
if (defined $week ! defined $year) {
$year = get_this_year();
}
if (defined $week defined $year) {
die Error: Do not define extra git arguments together
with --year, --week, --this-week options
if (@git_args);
@git_args = get_git_args_for_feek($year, $week);
$log_suffix = week-$year-$week unless (defined
$log_suffix)
}
You need not process these options in the wiki-dev-sum
wrapper. It might be enough to pass them to the
lo-commit-stat script.
3. Is there any other purpose of the wiki-dev-sum script?
BTW1: I was not sure what the --echo option means. Such functionality is
usually enabled via the option --verbose ;-)
Also the following negative condition looks a bit cryptic:
(! defined $echo) || show_call
I think that
(defined $verbose) show_call(...)
or
show_call(...) if (defined $verbose);
is slightly better readable ;-)
BTW2: Using /tmp/commit-log-$branch-wiki.log is a bit dangerous because
any user could write to this file (security hole, write access
problems). I suggest to create a temporary directory
under /tmp/wiki-dev-sum-XX and put files under it. The question is
why you need the temp file at all. It would be better if lo-commit-stat
generates the right file to the final location and no postprocessing is
needed.
that operates on a slightly modified lo-commit-stat script (basically just
adds --wiki format option)
http://nabble.documentfoundation.org/file/n3103449/lo-commit-stat
lo-commit-stat
It looks great. I am just not sure about the change:
--- cut ---
-(defined $top_dir) || die Error: top directory is not defined\n;
+if (! defined $top_dir) {
+ usage();
+ exit;
+}
--- cut ---
I think that the user might be confused why it prints help and what is
the exact problem.
The intention is to make as few changes as possible in lo-commit-stat while
getting to where a Weekly Development Summary wiki page is generated easily.
Do not hesitate to do more changes in lo-commit-stat ;-)
I attached full scripts and not patches because the pair is brand new and
neither fully