[comp.lang.eiffel] Using version control with Eiffel

chrisv@runx.oz.au (Chris Velevitch) (02/11/91)

Has anyone used version control with Eiffel?

What problems were encountered? Were you able to select which release is
to be used in the making of a system. What hooks exist in Eiffel that helps
you to use version control. Which version control did you use?


-- 
Chris Velevitch
RUNX Unix Timeshare    | Internet: chrisv@runxtsa.runx.oz.au
Sydney NSW, Australia. |     UUCP: uunet!runxtsa.runx.oz.au!chrisv

rick@tetrauk.UUCP (Rick Jones) (02/14/91)

In article <1991Feb11.021157.24169@runx.oz.au> chrisv@runx.oz.au (Chris Velevitch) writes:
>Has anyone used version control with Eiffel?
>
>What problems were encountered? Were you able to select which release is
>to be used in the making of a system. What hooks exist in Eiffel that helps
>you to use version control. Which version control did you use?

We are using good old SCCS for our version control.  However, we have a set of
C utilities and shell-script wrappers for it, which we have been using for
several years for all our existing C development.  These have slowly matured
over time (of course, unlike wine, software needs a little human help to
mature :-), and so it made sense to keep to our existing practices.

There's no real difference using version control with Eiffel than with anything
else as far as I can see;  the only change we had to make to our wrappers was
that they had suffix recognition coded in, mainly for for .c & .h.  We just had
to add the equivalent for .e.  Although we use "make" for C development, we've
never relied on make pulling the compilable versions out of the SCCS file;  our
wrappers always make sure that the correct compilable version is in the correct
directory.  If you like having "make" do the SCCS "get"s for you, then you
won't like the fact that "es" can't do it!

For embedding version numbers, the "indexing" clause in an Eiffel class is
useful.  Something like:

indexing
	version: "%W%" ;

will embed the SCCS "what" string against version.

One thing I would like to see, though, is for the Eiffel compiler to recognise
some specific keyword in the indexing clause, and use it to generate a #ident
line in the C code.  E.g. if "ident" were to be used as the keyword, then

indexing
	ident: "%W%" ;

would put the line:

#ident %W%

in the C code.  This means that the version string would be embedded in the
binary, readable using the "what" utility, without taking up run-time data
space.  For C compilers that don't support #ident (shame), the old method of a
static C string could be used.  This could be switchable in _eiffel.h via a
single #define to select alternate macros.

The concept of defining a complete set of versions to make a particular release
of a system is something we've not done on any of our developments, although I
think we really should introduce it.  I would anticipate building this onto our
existing SCCS methods, making it general purpose, so again I don't see Eiffel
being any different in this respect.

Hope this helps
-- 
Rick Jones
Tetra Ltd.  Maidenhead, 	Your .signature has expired,
Berks, UK			please apply to your analyst for a replacement
rick@tetrauk.uucp