Karim BELABAS on Mon, 24 Jun 2002 14:24:47 +0200 (MEST)


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

Re: add cvs date in GP status


On Thu, 20 Jun 2002, Bill Allombert wrote:
> if you sometime 'make install' pari CVS version, you may want to apply the
> following patch.
>
> This change the GP header to read
>
>           GP/PARI CALCULATOR Version 2.2.4 (development cvs-20020620)
>
> (if we are the 2002 06 20 that is) so you know which version you use.
> Also if you report a bug we have a better chance to know what happen. It is
> easy to recover the CVS tree as of a specific date.
>
> Should I commit it ?? it is a bit too simple-minded.
[...]
> +if test -d CVS; then
> +  status=`date +"$status cvs-%Y%m%d"`
> +fi

This would tell when Configure was used, not when the sources were fetched.
What about the following ?

if test -d CVS; then
  status="$status "`grep CHANGES CVS/Entries | awk -F/ '{print $4}'`
fi

which gives

   GP/PARI CALCULATOR Version 2.2.4 (development Sat Jun 22 11:03:53 2002)

Or (better, I think)

if test -d CVS; then
  status="$status CHANGES-"`grep CHANGES CVS/Entries | awk -F/ '{print $3}'`
fi

which gives

          GP/PARI CALCULATOR Version 2.2.4 (development CHANGES-1.447)

This assumes that CHANGES is modified whenever a patch is made (true for 99%
of patches).

I can add a (somewhat more complicated) perl script in config/ to get the
exact timestamp of the most recent modified file. It should be relatively
easy to get 'cvs history' to produced something equivalent, but I couldn't
come up with something easy in 2 minutes of 'man cvs'.

    Karim.
-- 
Karim Belabas                    Tel: (+33) (0)1 69 15 57 48
Dép. de Mathematiques, Bat. 425  Fax: (+33) (0)1 69 15 60 19
Université Paris-Sud             Email: Karim.Belabas@math.u-psud.fr
F-91405 Orsay (France)           http://www.math.u-psud.fr/~belabas/
--
PARI/GP Home Page: http://www.parigp-home.de/