This is a hand-made mail after an abortion of Vcs (a fresh install on a
machine where my GPG key was missing...). I tried to send this mail
using `vcs-svn mail' afterwards, but `mail' looks like an inner method
according to Vcs' sources (even if it's mentioned by `vcs-svn help').
Is there any plan to support `mail' as a Vcs user command in the future?
https://svn.lrde.epita.fr/svn/havm/trunk
Index: ChangeLog
from Roland Levillain <roland(a)lrde.epita.fr>
Rename config/ as build-aux/.
* configure.ac: Bump to 0.23a.
(AC_CONFIG_AUX_DIR): s/config/build-aux/.
configure.ac | 4 ++--
1 files changed, 2 insertions, 2 deletions
Index: configure.ac
--- configure.ac (revision 159)
+++ configure.ac (working copy)
@@ -16,8 +16,8 @@
# MA 02111-1307, USA.
AC_PREREQ([2.59])
-AC_INIT([HAVM], [0.23], [tiger-patches(a)lrde.epita.fr])
-AC_CONFIG_AUX_DIR([config])
+AC_INIT([HAVM], [0.23a], [tiger-patches(a)lrde.epita.fr])
+AC_CONFIG_AUX_DIR([build-aux])
AM_INIT_AUTOMAKE([1.9 dist-bzip2])
AC_CHECK_TOOL([GHC], [ghc], [no])
https://svn.lrde.epita.fr/svn/havm/trunk
Index: ChangeLog
from Roland Levillain <roland(a)lrde.epita.fr>
Use AS_VERSION_COMPARE to check GHC's version number.
* build-aux/version-compare.m4: New file.
* build-aux/prog.m4: New file.
(HAVM_PROG): New macro.
* configure.ac: Use it to check that GHC's version is at least 6.4.
Catch "HAVM_*" macros that are not expanded.
* Makefile.am: Add build-aux to the list of directories scanned by
aclocal.
Makefile.am | 2 +
build-aux/prog.m4 | 36 +++++++++++++++++++
build-aux/version-compare.m4 | 80 +++++++++++++++++++++++++++++++++++++++++++
configure.ac | 7 +--
4 files changed, 121 insertions, 4 deletions
Index: configure.ac
--- configure.ac (revision 161)
+++ configure.ac (working copy)
@@ -15,15 +15,14 @@
# the Free Software Foundation, 59 Temple Place - Suite 330, Boston,
# MA 02111-1307, USA.
+# Catch "HAVM_*" macros that are not expanded.
+m4_pattern_forbid([^HAVM_])
AC_PREREQ([2.59])
AC_INIT([HAVM], [0.23a], [tiger-patches(a)lrde.epita.fr])
AC_CONFIG_AUX_DIR([build-aux])
AM_INIT_AUTOMAKE([1.9 dist-bzip2])
-AC_CHECK_TOOL([GHC], [ghc], [no])
-if test $GHC = no; then
- AC_MSG_ERROR([GHC is required])
-fi
+HAVM_PROG([ghc], [6.4], [GHC], [Glasgow Haskell Compiler])
AM_MISSING_PROG([HAPPY], [happy])
AC_CONFIG_FILES([
Index: Makefile.am
--- Makefile.am (revision 161)
+++ Makefile.am (working copy)
@@ -15,6 +15,8 @@
# the Free Software Foundation, 59 Temple Place - Suite 330, Boston,
# MA 02111-1307, USA.
+ACLOCAL_AMFLAGS = -I build-aux
+
SUBDIRS = src doc debian
install-epita:
Index: build-aux/prog.m4
--- build-aux/prog.m4 (revision 0)
+++ build-aux/prog.m4 (revision 0)
@@ -0,0 +1,36 @@
+# -*- Autoconf -*-
+
+# HAVM_PROG(PROGRAM, REQUIRED-VERSION, VARIABLE, DESCRIPTION)
+# -----------------------------------------------------------
+# Check whether PROGRAM version is greater or equal to REQUIRED-VERSION.
+# Define VARIABLE as an Autoconf variable for this program, along with
+# its DESCRIPTION.
+AC_DEFUN([HAVM_PROG],
+ [AC_REQUIRE([AS_VERSION_COMPARE])dnl
+ AC_ARG_VAR([$3], [$4])
+ AC_CHECK_PROGS([$3], [$1])
+ [required_version="`echo \"$2\" | grep '^[0-9][0-9.]*$'`"]
+ if test -z "$required_version" ; then
+ AC_MSG_ERROR([[This macro requires a [0-9.]+ argument]])
+ fi
+ if test -n "$$3" ; then
+ AC_CACHE_CHECK([for $1 >= $required_version],
+ [ac_cv_$1_version],
+ [[actual_version=`$$3 --version | \
+ sed 's/^[^0-9]*\([0-9][0-9.]*[0-9]\).*$/\1/'`]
+ if test -z "$actual_version" ; then
+ ac_cv_$1_version=no
+ else
+ ac_cv_$1_version=yes
+ fi
+ if test x$ac_cv_$1_version = xyes ; then
+ AS_VERSION_COMPARE([$actual_version], [$required_version],
+ [ac_cv_$1_version=no],
+ [ac_cv_$1_version=yes],
+ [ac_cv_$1_version=yes])])
+ fi
+ fi
+ if test x$ac_cv_$1_version != xyes; then
+ AC_MSG_ERROR([$1 $required_version or newer is required])
+ fi
+])
Index: build-aux/version-compare.m4
--- build-aux/version-compare.m4 (revision 0)
+++ build-aux/version-compare.m4 (revision 0)
@@ -0,0 +1,80 @@
+# Remove this as soon as Autoconf 2.60 airs. -*- Autoconf -*-
+
+# _AS_VERSION_COMPARE_PREPARE
+# ---------------------------
+# Output variables for comparing version numbers.
+AC_DEFUN([_AS_VERSION_COMPARE_PREPARE],
+[[as_awk_strverscmp='
+ # Use only awk features that work with 7th edition Unix awk (1978).
+ # My, what an old awk you have, Mr. Solaris!
+ END {
+ while (length(v1) || length(v2)) {
+ # Set d1 to be the next thing to compare from v1, and likewise for d2.
+ # Normally this is a single character, but if v1 and v2 contain digits,
+ # compare them as integers and fractions as strverscmp does.
+ if (v1 ~ /^[0-9]/ && v2 ~ /^[0-9]/) {
+ # Split v1 and v2 into their leading digit string components d1 and d2,
+ # and advance v1 and v2 past the leading digit strings.
+ for (len1 = 1; substr(v1, len1 + 1) ~ /^[0-9]/; len1++) continue
+ for (len2 = 1; substr(v2, len2 + 1) ~ /^[0-9]/; len2++) continue
+ d1 = substr(v1, 1, len1); v1 = substr(v1, len1 + 1)
+ d2 = substr(v2, 1, len2); v2 = substr(v2, len2 + 1)
+ if (d1 ~ /^0/) {
+ if (d2 ~ /^0/) {
+ # Compare two fractions.
+ while (d1 ~ /^0/ && d2 ~ /^0/) {
+ d1 = substr(d1, 2); len1--
+ d2 = substr(d2, 2); len2--
+ }
+ if (len1 != len2 && ! (len1 && len2 && substr(d1, 1, 1) == substr(d2, 1, 1))) {
+ # The two components differ in length, and the common prefix
+ # contains only leading zeros. Consider the longer to be less.
+ d1 = -len1
+ d2 = -len2
+ } else {
+ # Otherwise, compare as strings.
+ d1 = "x" d1
+ d2 = "x" d2
+ }
+ } else {
+ # A fraction is less than an integer.
+ exit 1
+ }
+ } else {
+ if (d2 ~ /^0/) {
+ # An integer is greater than a fraction.
+ exit 2
+ } else {
+ # Compare two integers.
+ d1 += 0
+ d2 += 0
+ }
+ }
+ } else {
+ # The normal case, without worrying about digits.
+ if (v1 == "") d1 = v1; else { d1 = substr(v1, 1, 1); v1 = substr(v1,2) }
+ if (v2 == "") d2 = v2; else { d2 = substr(v2, 1, 1); v2 = substr(v2,2) }
+ }
+ if (d1 < d2) exit 1
+ if (d1 > d2) exit 2
+ }
+ }
+']])
+
+# AS_VERSION_COMPARE(VERSION-1, VERSION-2,
+# [ACTION-IF-LESS], [ACTION-IF-EQUAL], [ACTION-IF-GREATER])
+# -----------------------------------------------------------------------------
+# Compare two strings possibly containing shell variables as version strings.
+AC_DEFUN([AS_VERSION_COMPARE],
+[AS_REQUIRE([_$0_PREPARE])dnl
+as_arg_v1=$1
+as_arg_v2=$2
+dnl This usage is portable even to ancient awk,
+dnl so don't worry about finding a "nice" awk version.
+awk "$as_awk_strverscmp" v1="$as_arg_v1" v2="$as_arg_v2" /dev/null
+case $? in
+1) $3;;
+0) $4;;
+2) $5;;
+esac[]dnl
+])
>>> "Nicolas" == Nicolas Pouillard <nicolas.pouillard(a)gmail.com> writes:
> - The locale LC_ALL=C has stranges behaviors.
Err... This statement is even stranger: portable scripts set LC_ALL=C
and I never experienced problems in such a context. Alternatively,
you may unset it. But remember to cover the whole set of locale
related envvars.
>>> "Nicolas" == Nicolas Desprès <nicolas.despres(a)gmail.com> writes:
> On 3/4/06, Roland Levillain <roland(a)lrde.epita.fr> wrote:
>>
>> Thanks!
>>
>> By the way, is there a place in the Vcs distribution where these
>> options are documented?
>>
> They will ASAP! We just need more arms :-).
To program, hands are more... handy. :)
I set up a Vcs install in another machine today, and I ran into a
new problem :
~/src/nolimips % vcs-svn status
vcs: error: command: svn status --
vcs: error: exit: 1
vcs: error: stderr: svn: error: cannot set LC_ALL locale
vcs: error: stderr: svn: error: environment variable LC_ALL is en_US
vcs: error: stderr: svn: error: please check that your locale name is
correct
vcs: error: command failed
However, after the installation of fresh new en_US locale (thank you,
dpkg-reconfigure!), the error vanished.
Does this means that Vcs has a dependency on a en_US locale?
(`vcs --check' doesn't mention it, BTW.)
https://svn.lrde.epita.fr/svn/nolimips/trunk
I didn't mention the removal of src/inst/fwd.hh from the repository in
ChangeLog, because ChangeLogs must notify changes w.r.t the distribution,
not the repository.
Index: ChangeLog
from Roland Levillain <roland(a)lrde.epita.fr>
* vcs/nolimips.rb: Use the right e-mail address.
nolimips.rb | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Index: vcs/nolimips.rb
--- vcs/nolimips.rb (revision 215)
+++ vcs/nolimips.rb (working copy)
@@ -7,7 +7,7 @@
def nolimips_commit! ( *args )
common_commit!("nolimips 216: <%= title %>", *args) do |subject|
- mail!(:to => %w[tiger-patches(a)lrde.epita.fr], :subject => subject)
+ mail!(:to => %w[projects(a)lrde.epita.fr], :subject => subject)
end
end
alias_command :nolci, :nolimips_commit
>>>>> "Nicolas" == Nicolas Pouillard <nicolas.pouillard(a)gmail.com> writes:
Nicolas> On 3/2/06, Roland Levillain <roland(a)lrde.epita.fr> wrote:
>> Vcs 0.4 used to have nice colors in its outputs, but the current
>> version doesn't. Is this voluntary? And/or is there any option to
>> re-enable it? TIA !
Nicolas> Yes you must enable it.
Nicolas> Here some useful variables that one can put in our ~/.vcs
Nicolas> color: xmas_tree # Yes I want some terminal paintings
Nicolas> new_user: false # I am not a newbe anymore so you can remove
Nicolas> long explainations
Nicolas> interactive: true # I want to type more Yes/No than Akim :)
Thanks!
By the way, is there a place in the Vcs distribution where these
options are documented?
I tried to update my Gem copy of Vcs with this one:
http://www.lrde.epita.fr/~pouill_n/vcs/vcs-0.5.2.3.gem
but I got:
brasilia ~/download/software/ruby/vcs % sudo gem install vcs-0.5.2.3.gem
Attempting local installation of 'vcs-0.5.2.3.gem'
ERROR: Error installing gem vcs-0.5.2.3.gem[.gem]: undefined method `include?' for nil:NilClass
:(