Ça faisait longtemps qu'il n'y avait pas eu de release, la version 0.4
de svn-wrapper est maintenant dispo. Je n'ai pas maintenu de fichier
NEWS donc voici en gros ce qui a changé:
- Modif majeure: support de Git (cf. plus bas)
- B0rkenage des signatures GPG (ne pas utiliser pour l'instant :D)
- Corrections de problèmes de portabilité sur Ash (shell par défaut
sur GNU/Debian).
- svn ignore se comporte (a peu près) comme la commande ignore de VCS.
- Pleins de bug fixes, de "Do The Right Thing" et "Do What I Mean"[1].
Le script est maintenant hosté sur Git (http://repo.or.cz/w/svn-wrapper.git)
et la prochaine update (svn-wrapper.sh self-update) va sûrement se
plaindre, un truc du genre:
Wow, you're more up to date than the master copy :)
Your version is r241 and the master copy is r8.
Downgrade? [y/N]
Ce à quoi il faut juste répondre 'y' :)
Sinon, méthode bourrin:
wget 'http://repo.or.cz/w/svn-wrapper.git?a=blob_plain;f=svn-wrapper.sh;hb=HEAD' -O svn-wrapper.sh
chmod a+x svn-wrapper.sh
Le support de Git:
Je n'utilise (presque) plus SVN. Pour interagir avec les dépôts SVN,
j'utilise git-svn qui s'avère être un client SVN largement supérieur
à `svn' lui-même. J'avais donc besoin d'avoir les mêmes
fonctionnalités que svn-wrapper mais pour Git. Le script détecte
donc automatiquement les dépots Git et les dépots SVN, et "Does The
Right Thing" en fonction du SCM utilisé.
Les signatures GPG:
Pour l'instant j'utilisais une signature GPG-inline ce qui est chiant
car elle rends le patch dur à lire/extraire dans les mail readers qui
ne décodent pas le mail correctement. J'ai donc tenté d'implémenter
l'envois de signature en attachement PGP/MIME mais ça ne marche pas
(la signature envoyée est invalide, pour une raison qui m'échappe).
J'avoue que je ne me suis pas trop soucié de ce problème qui traîne
depuis plus de 2 mois puisque Git gère les tags signés avec GPG, je
ne m'embête plus à signer chaque commit.
Let me know if you run in troubles :)
[1] En parlant de DWIM, Jim Meyering a releasé la 1.0 de son vc-dwim:
http://lists.gnu.org/archive/html/bug-gnulib/2007-10/msg00135.html
« vc-dwim is a version-control-agnostic ChangeLog diff and commit tool.
vc-chlog is a ChangeLog writing helper tool. »
J'ai pas encore eu le temps de regarder, mais il se peut bien que
j'arrête de maintenir svnw si vc-dwim fait tout mieux ;)
--
SIGOURE Benoit aka Tsuna (SUSv3 compliant)
_____ "I think Git is definitely in the running
/EPITA\ Promo 2008.CSI/ACU/YAKA to be the dominate version control system."
-- Bob Proulx
>>> "The" == The LRDE Buildbot <tsuna(a)lrde.epita.fr> writes:
The> URL: https://svn.lrde.epita.fr/svn/lrde-tools/trunk/buildbot/masters
The> ChangeLog:
The> 2007-11-08 Benoit Sigoure <tsuna(a)lrde.epita.fr>
The> Add a buildfarm for Vaucanson.
The> * vaucanson_master.cfg: New.
The> * www/index.php: Link to the new waterfall.
C'est cool !
À quelle adresse peut-on lire le résultat ?
--
Alexandre Duret-Lutz
Simon Nivault <simon.nivault(a)lrde.epita.fr> writes:
> URL: https://svn.lrde.epita.fr/svn/lrde-tools/trunk
>
> ChangeLog:
> 2007-11-15 Simon Nivault <simon.nivault(a)lrde.epita.fr>
>
> Tool for checking guards of header files of a project.
>
> * README: Add description.
> * src/check-guards: New.
Cool!
> Index: trunk/src/check-guards
> ===================================================================
> --- trunk/src/check-guards (revision 0)
> +++ trunk/src/check-guards (revision 454)
> @@ -0,0 +1,39 @@
> +#!/bin/sh
> +
> +# Utility to check guards of header files.
> +# Usage : ./check-guards BASE SUB...
> +#
> +# - BASE : Specify the root of the project.
> +# For example, here an header file :
> +# /home/user/proj1/prj/module1/header.hh
> +# The path '/home/user/proj1/' should be used
> +# if the expected guard for this file is
> +# "PRJ_MODULE1_HEADER_HH".
> +# Warning! BASE must end with one '/'
> +#
> +# - SUB : Specify the element you want to verify.
> +# Those element can be either directories or files
> +# and are expected to be located in BASE.
> +#
> +############################################################
> +
> +base_dir=$1
> +shift
> +loc=$@
> +
> +for sub in $loc
In fact, you can just write
for sub
here, and get rid of `loc' (by default, for iterates on `$@' [1]).
> + do
> + for file in $(find ${base_dir}$sub -name '*.hh')
> + do
> + expr1=$(echo "${file##$base_dir}" | tr "[:lower:]" "[:upper:]" | tr "[:punct:]" "_")
It's still nice to use lines smaller than 80 columns (even in shell
scripts!). :)
> + expr2=$(cat $file | grep "#ifndef" | grep HH | cut -d ' ' -f 2)
> + expr3=$(cat $file | grep "# define" | grep HH | cut -d ' ' -f 3)
> + expr4=$(cat $file | grep "#endif" | grep HH | cut -d ' ' -f 4)
Instead of
cat file | cmd ...
you can just write
cmd <file ...
(it saves a fork).
> + if [ "$expr1" = "$expr2" -a "$expr1" = "$expr2" -a "$expr1" = "$expr2" ]; then
Likewise with the 80 columns.
Moreover, this lines looks weird. Didn't you want to write
if [ "$expr1" = "$expr2" -a \
"$expr1" = "$expr3" -a \
"$expr1" = "$expr4" ]; then
instead ?
> + res=OK
> + else
> + res="KO, should be $expr1"
> + fi
> + echo "${file##$base_dir} : $res"
> + done
> +done
> \ No newline at end of file
Text files shall end with a newline character.
> Index: trunk/README
> ===================================================================
> --- trunk/README (revision 453)
> +++ trunk/README (revision 454)
> @@ -139,6 +139,9 @@
> ** src/apatche
> Send patches to a mailing list.
>
> +** src/check-gards
> +Check recursivly all the guards of header files.
s/recursivly/recursively/
s/header/C and C++ header/
Thanks for this contribution! :)
Notes:
[1] See Bash's manual for instance:
for name [ in word ] ; do list ; done
The list of words following in is expanded, generating a list of
items. The variable name is set to each element of this list in
turn, and list is executed each time. If the in word is omit-
ted, the for command executes list once for each positional
parameter that is set (see PARAMETERS below). The return status
is the exit status of the last command that executes. If the
expansion of the items following in results in an empty list, no
commands are executed, and the return status is 0.
URL: https://svn.lrde.epita.fr/svn/lrde-tools/trunk
ChangeLog:
2007-11-15 Simon Nivault <simon.nivault(a)lrde.epita.fr>
Tool for checking guards of header files of a project.
* README: Add description.
* src/check-guards: New.
---
README | 3 +++
src/check-guards | 39 +++++++++++++++++++++++++++++++++++++++
2 files changed, 42 insertions(+)
Index: trunk/src/check-guards
===================================================================
--- trunk/src/check-guards (revision 0)
+++ trunk/src/check-guards (revision 454)
@@ -0,0 +1,39 @@
+#!/bin/sh
+
+# Utility to check guards of header files.
+# Usage : ./check-guards BASE SUB...
+#
+# - BASE : Specify the root of the project.
+# For example, here an header file :
+# /home/user/proj1/prj/module1/header.hh
+# The path '/home/user/proj1/' should be used
+# if the expected guard for this file is
+# "PRJ_MODULE1_HEADER_HH".
+# Warning! BASE must end with one '/'
+#
+# - SUB : Specify the element you want to verify.
+# Those element can be either directories or files
+# and are expected to be located in BASE.
+#
+############################################################
+
+base_dir=$1
+shift
+loc=$@
+
+for sub in $loc
+ do
+ for file in $(find ${base_dir}$sub -name '*.hh')
+ do
+ expr1=$(echo "${file##$base_dir}" | tr "[:lower:]" "[:upper:]" | tr "[:punct:]" "_")
+ expr2=$(cat $file | grep "#ifndef" | grep HH | cut -d ' ' -f 2)
+ expr3=$(cat $file | grep "# define" | grep HH | cut -d ' ' -f 3)
+ expr4=$(cat $file | grep "#endif" | grep HH | cut -d ' ' -f 4)
+ if [ "$expr1" = "$expr2" -a "$expr1" = "$expr2" -a "$expr1" = "$expr2" ]; then
+ res=OK
+ else
+ res="KO, should be $expr1"
+ fi
+ echo "${file##$base_dir} : $res"
+ done
+done
\ No newline at end of file
Property changes on: trunk/src/check-guards
___________________________________________________________________
Name: svn:executable
+ *
Index: trunk/README
===================================================================
--- trunk/README (revision 453)
+++ trunk/README (revision 454)
@@ -139,6 +139,9 @@
** src/apatche
Send patches to a mailing list.
+** src/check-gards
+Check recursivly all the guards of header files.
+
** src/g2b
Change the compression system from Gzip to Bzip2.
>>> "RL" == Roland Levillain <roland(a)lrde.epita.fr> writes:
> https://svn.lrde.epita.fr/svn/lrde-tools/trunk
> This should ease the transition to PySyck 0.61 (which supports
> multiple YAML document in a single file/stream) for Mac OS X users.
> TC's generators should run fine with the programs installed by this script.
Youpi !
Merci !
https://svn.lrde.epita.fr/svn/lrde-tools/trunk
Index: ChangeLog
from Roland Levillain <roland(a)lrde.epita.fr>
* README: Update paths and descriptions.
README | 147 +++++++++++++++++++++++++++++++++--------------------
ics2mail/weekly.sh | 5 +
2 files changed, 96 insertions(+), 56 deletions(-)
Index: README
--- README (revision 452)
+++ README (working copy)
@@ -1,136 +1,173 @@
--*- text -*-
+LRDE Tools -*- outline -*-
-* ChangeLog management
+The LRDE Tools provide a collection of utilities aimed at making the
+life of developers easier.
-** cl-date
+
+* ChangeLog Management
+** changelog/cl-count
+Report the number of ChangeLog entries per author.
+
+** changelog/cl-date
Change the date format in ChangeLogs.
-** cl-first
+** changelog/cl-first
Extract the first entry from ChangeLogs.
-** cl-merge
+** changelog/cl-merge
Merge several ChangeLogs into one, sorting the entry.
-** cl-prefix
+** changelog/cl-prefix
Prefix the files of a ChangeLog with a directory. Useful when moving
ChangeLogs.
-** cl-single-header
+** changelog/cl-single-header
Some people issue one ChangeLog header (date & author) per patch,
other simply issue an empty line between ChangeLog entries sharing the
same date & author. This program replaces subsequent equal headers in
ChangeLog by empty lines.
-** clcnt
-Report the number of ChangeLog entries per author.
+** src/cl2patch
+Prepare a patch for application: change the date for ChangeLog entries.
+* Diff utilities
+** src/diffed
+Manipulate patches in the diff format.
-* CVS Utilities
-** cvapply
+** src/diff-r
+Recursive diff between two files/tarballs.
+
+** src/xdiff
+A wrapper around "diff" that recognize files by their extension
+to provide heading for diff hunks. It is meant to completely
+replace "diff" (but slaving it).
+
+
+* Version Control Utilities
+
+** (Near-) Agnostic Version Control Utilities
+*** src/checkin
+An ancestor of Vcs and svn-wrapper.
+
+*** vcs/
+An extensibe Version Control System wrapper for Subversion, CVS, and
+other VCS, written in Ruby. As of now, Vcs mainly supports
+Subversion, and some CVS features.
+
+** CVS Utilities
+*** src/cvapply
Apply a batch of patches to a CVS repository.
-** cvsfiles
+*** src/cvsfiles
List CVS-controlled files in a tree.
-** cvsldup
+*** src/cvsldup
Duplicate a CVS tree locally.
-** cvssnap
+*** src/cvssnap
Build a tarball with all CVS-controlled files.
+** PRCS Utilities
+*** prcs/
+Miscellaneous scripts for PRCS. See prcs/README for more details.
-* PRCS Utilities
-** prcommit
-As clcommit: commit a version of a PRCS controlled project, adjusting
-the New-Version-Log from the ChangeLog.
-
-** prcs-back
+*** src/prcs-back
Run backwards in the history of the project until a property is met.
Useful to find origin of bugs.
-** prcs-checkout
+*** src/prcs-checkout
Make sure that when a file is checked out, its time stamp is updated,
so that "make" does its job.
-** prcs-diff-cb
+*** src/prcs-commit
+As clcommit: commit a version of a PRCS controlled project, adjusting
+the New-Version-Log from the ChangeLog.
+
+*** src/prcs-diff-cb
A call back for prcs diff that can use this information to provide
information in various forms.
-** prcs-list-nonignored
+*** src/prcs-list-nonignored
Simple list of files not in the repository, and not ignored. Useful
to check for files to add to the repository.
-** prcs2cl
+*** src/prcs2cl
Wrap a proto ChangeLog entry based on prcs diff.
-** Prcs2svn
+*** prcs2svn/
Export an archive from PRCS to Subversion.
-** prcsin
+*** src/prcsin
Put a tarball under PRCS.
-** prdiff
+*** src/prdiff
Make clean diff between revision of a PRCS controlled project.
-
** Subversion Utilities
-** svn-populate
-Subversion adaptation of prcs populate command.
-
-** svn-ignore
+*** src/svn-ignore
Quickly add ignore entries in subversion. Automatically determine the
concerned directory.
-** svndiff
+*** src/svn-populate
+Subversion adaptation of prcs populate command.
+
+*** src/svndiff
A better svn diff.
-* Miscellaneous utilities
-** apatche
-Send patches to a mailing list.
-** cl2patch
-Prepare a patch for application: change the date for ChangeLog entries.
+* Automated Builds
+** buildfarm/
+The (old) LRDE build farm, based on Samba's.
+
+** buildbot/
+Helper scripts for a BuiltBot-based build farm.
-** diffed
-Manipulate patches in the diff format.
-** g2b
+* Time Management and Calendars
+** ics2mail/weekly.sh
+Compute the number of work/busy hours from an ICS calendar hosted on a
+Web server.
+
+
+* Miscellaneous utilities
+** metaInternshipSite/
+A generator for the mandatory Internship Web site EPITA (Ing) students are
+expected to deliver at the end of their first internship (at the
+beginning of ``Ing 2'').
+
+** src/apatche
+Send patches to a mailing list.
+
+** src/g2b
Change the compression system from Gzip to Bzip2.
-** insist
+** src/insist
Repeatedly do something until it succeeds.
-** install-on
+** src/install-on
Remotely install a package on a machine.
** src/install-pysyck
Install PySyck from http://pyyaml.org. Useful under Mac OS X, whose
MacPorts do not contain PySyck.
-** rdiff
-Recursive diff between two files/tarballs.
-
-** symbuild
+** src/symbuild
Easy navigation between source and build trees
-** tarr
+** src/tarr
Quickly make tarballs.
-** timeout
+** src/timeout
Run a command and killing it if it is too slow.
-** whitespace
+** src/whitespace
Normalize whitespace uses in files.
-** xdiff
-A wrapper around "diff" that recognize files by their extension
-to provide heading for diff hunks. It is meant to completely
-replace "diff" (but slaving it).
--
-Copyright (C) 2003 LRDE
+Copyright (C) 2003, 2007 LRDE
This file is part of LrdeTools. This program is free software; you can
redistribute it and/or modify it under the terms of the GNU General
Index: ics2mail/weekly.sh
--- ics2mail/weekly.sh (revision 452)
+++ ics2mail/weekly.sh (working copy)
@@ -75,6 +75,9 @@
}
}
' "$cal" | sed 's/é/�/g'
-# if anyone can convert UTF8 to ascii automatically ... I didn't manage to.
+# FIXME: if anyone can convert UTF8 to ascii automatically ... I
+# didn't managed to.
+#
+# 2007-11-13: Use recode! -- Roland.
rm "$cal"