RevHead
A
Linux program to manage version and changelog details for programmers
by David M. Balean
The icon used for revhead is from a photograph of my 1974 Jensen Interceptor.
Introduction
This describes revhead-4.3.0 which supplies support for C, C++, ADA, FORTRAN, PERL, PHP, and JAVA. RevHead,
with the user's input, maintains a comment header at the start of
each source file and creates a changelog file each time the user
requests revhead to perform an update. Also, if requested, a version
file is created such as "RH_version.h" for use within the program being
created. Also a defaults file can be created in the user's home
directory. There are tooltips to help the user.
RevHead
was originally written by me for the Amiga in the early 1990s and has
slowly metamorphosed over the years to become something which may be
useful and hopefully not too bug-ridden. This version has been updated
to used GTK 3 and the GTK 3 file chooser but otherwise it is very
similar to the previos version.
To install revhead in Ubuntu or Debian, download the RPM and
convert it to DEB format using the command:-
alien -d revhead-4.3.0-1.fc12.x86_64.rpm
from the command line. The resulting .deb file
can be installed by clicking on it with the mouse. To install on a
non-x86_64 compatible system such as sparc or i386, the tar file can be
downloaded and compiled from scratch or you can try creating a local rpm with following method.
An .rpm spec file is included. Assuming rpm is installed fully, you can create an .rpm file for the current operating system as follows:-
Download revhead-4.3.0.tar.gz
Open a console window and change to the directory containing revhead-4.3.0.tar.gz
Issue the following command as the normal user:-
$ rpmbuild -ta revhead-4.3.0.tar.gz
The resulting rpm should be found in the user's rpmbuild directory in RPMS/os-type where os-type is, for example, i386 or whatever the current operating system is.
Brief Description
The
program starts with the main window which gives several options above
which is a status area. Probably the user will require some defaults
for all new projects so click on DEFAULTS if it is the first time the program is being used. The defaults can easily be changed later by choosing DEFAULTS again. There are three pages to fill. The defaults are kept in .revhead.defaults in the home directory of the user. Now use CHANGE CURRENT DIRECTORY
to move to the desired project directory. If it is a new project there
may be no directory, so the user can create one from this window if
necessary. Once in the correct directory it will be necessary to create
an environment if there isn't one already. It is not possible to UPDATE unless there is an environment, in other words, if it is a new project then the UPDATE button is inactive. To create or modify the environment for the project click on PROJECT ENVIRONMENT. The environment is kept in .revhead.project
in revhead's project directory. Having entered whatever is required
into the environment pages, everything should be ready for an update,
so click on UPDATE THIS PROJECT.
The first to appear will be the update project window. Check over the
details on each page and edit as required. Revhead now cycles through
all the source files that have changed so that the user can enter
information concerning each file in a file details window. To force a
file to be updated, select TOUCH FILE(S) from
the main window and the select that file to be touched. On the other
hand to prevent a file from being updated it is possible to select Don't Update from the update file window or alternatively select FIXDATE FILES(S)
from the main window and select the file provided it has previously
been processed by revhead. When all the files have been cycled and
processed revhead writes any version header files that are required and
re-writes the environment and changelog.
Some
Screen Shots with comments
Main Window
In this window the UPDATE THIS PROJECT option
is disabled because the project is new. It needs the user to create an
environment before it can be updated. A simple popup menu which includes "About" is available by right-clicking anywhere in this window that isn't "ghosted" (disabled).
Defaults, Project Page
In this window the user has selected "Auto-increment MICRO version" so
that the micro version will be incremented each time that the project
is updated with revhead although this can be over-ridden by the user during update.
Change Directory
"OK, DO IT" was clicked the chosen directory for revhead's project directory changed to /home/david/Projects/revhead-4.3.0
Environment - Language & Log Page
Note that several languages can be chosen here.
Environment - Version Files Page
On this page the user can select if version file(s) are required and also where to place them.
If a path for the version file(s) is not chosen, the version file is
placed in the first suitable directory encountered during the update
defaulting to the project directory if none is found.
Environment - Directories and ChangeLog Page
Note that in this page the project path is /home/david/Projects/revhead-4.3.0 from the point of view of revhead. A different path may be wanted for the changelog. Also, if preferred, ChangeLog can be edited to give it another name e.g. changelog. Several source directories can be chosen if required.
Warning Window
Warnings
or information of various kinds may pop up. In this case the user was
fixing the environment and it was noticed that the changelog file was
not in
revhead's project path. Revhead only knows about its own project path
which the user may have selected to be different from the actual
project path. Revhead's project path is the directory containing .revhead.project, the environment file.
Update Project - Name, Version & Contact
Note
that in this page the micro version number was incremented manually. The changelog entry
for this version will be modified having extra data added if required.
Update Project - Copyright
Assuming the copyright notice is to be the same as the default, it
shouldn't be necessary to make any changes.
Update Project - Summary & Comments
In
this page the user is entering a comment for this new version of
the project. Normally the summary of the project would remain constant
unless a major change occurred. Comments and summary appear in the changelog file.
Update File
In
this page the user can select to have a version for this file. If so,
the file version area becomes active and the required version can be
inserted or edited. The file version appears in the comment header
at the start of the source file. Each file can also have comments and a
summary
similar to the project if required. The comments and summary appear in
the
changelog file. If the user selected to have file versions, a checkbox
becomes available so that, if file versions are auto-incremented,that behaviour can be suppressed for this file.
Touch Files
Here the user has selected "complain.cpp", "datet.cpp" and "defaults.cpp" to touch, assuming "OK, DO IT!" is clicked.
This means that those files behave as if they had been
changed, in other words they will appear when revhead updates so that
comments can be inserted.
Fixdate Files
This is the reverse of touch in that it makes the file's date agree
with the date in the header of that file so it won't appear when
revhead is updating.
Example - part of an environment file
# Environment file "/home/david/Projects/revhead-4.2.9/.revhead.project"
# created by RevHead-4.2.9 Mon Jun 27 21:19:00 2011
# Project Details
PROJECT_Name = RevHead
PROJECT_Version = 4.2.9
PROJECT_Email = linprogs@balean.net
DATE_Started = 15-Sep-2008 11.16.15 -36000 0
START_Summary
Create/maintain programming file revision headers and history
END_Summary
START_Contact
email: linprogs@balean.net
snail: D.M. Balean, 44 Wyong Road, Killarney Vale, N.S.W. 2261, AUSTRALIA
URL: http://balean.net/linprogs
END_Contact
# Copyright Details
Copyright_Owner = David M. Balean
START_Copyright
This program is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License or,
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
END_Copyright
# Languages, Versions and Log
CPP = 1
C_Version = 1
C_Version_Path = /home/david/Projects/revhead-4.2.9/src
LOG = 1
OVERWRITE_Log = 1
PROJECT_Want_Micro = 1
PROJECT_Auto_Inc = 1
# Source Directories and ChangeLog Path
START_Sources
/home/david/Projects/revhead-4.2.9/src
END_Sources
CHANGELOG_Name = ChangeLog
CHANGELOG_Path = /home/david/Projects/revhead-4.2.9
START_Changelog
2011-06-27 21:08:36 David M. Balean <linprogs@balean.net>
* RevHead-4.2.9
Numerous bug fixes and removal of "features".
Project micro version is now optional.
Improved ability to use smaller screens.
Fixed bug with .c files
Made project micro version optional
Added to the "Applications" menu (Development/Programming)
*
revhead.cpp 2011-06-26 15:06:59
David M. Balean <linprogs@balean.net>
Fixed serious bug in "get_file_type()" - (prevented c updates)
Code to use additions to flags to allow optional project micro version
*
defaults.cpp 2011-06-25 22:11:07
David M. Balean <linprogs@balean.net>
Fixed size problems
Added code for optional micro versions
*
fixfiles.cpp 2011-06-25 22:21:27
David M. Balean <linprogs@balean.net>
Fixed size
*
entrylist.cpp 2011-06-25 15:55:03
David M. Balean <linprogs@balean.net>
*
environment.cpp 2011-06-26 12:15:28
David M. Balean <linprogs@balean.net>
Lots of changes for size and optional project micro version
Example of File Header
/****************************************************************************
*RevHead_Start
*
*
*
* Project
Details
*
*
---------------
*
*Project Name:
RevHead
*
*Project Version:
4.2.9
*
*Copyright Owner: David M. Balean
<linprogs@balean.net>
*
*Copyright
Notice:
*
* This program is free software; you can redistribute it and/or modify it *
* under the terms of the GNU General Public License as published by *
* the Free Software Foundation, either version 3 of the License or, *
* (at your option) any later
version.
*
* This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty
of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE.
*
* See the GNU General Public License for more
details.
*
* You should have received a copy of the GNU General Public License *
* along with this program. If not, see <http://www.gnu.org/licenses/>. *
*
*
*Project Date: Monday 27th June
2011
*
*
*
*Start DateStamp: 15-Sep-2008 11.16.15 -36000
0
*
*
*
*Contact:
*
* email:
linprogs@balean.net
*
* snail: D.M. Balean, 44 Wyong Road, Killarney Vale, N.S.W. 2261, AUSTRALIA *
* URL:
http://balean.net/linprogs
*
*
*
*Project
Summary:
*
* Create/maintain programming file revision headers and
history
*
*
*
*****************************************************************************
*
*
*This File:
revhead.cpp
*
*Author: David M.
Balean
<linprogs@balean.net>
*
*DateStamp: 26-Jun-2011 15.06.59
-36000
0
*
*
*
*File
Summary:
*
* The main entry point and several supporting
routines
*
* 30-Sep-2001 16.29.29 -36000 0.00 David M.
Balean
*
* 30-Sep-2001 16.29.29 -36000 0.01 David M.
Balean
*
* Added RH_ to the start of the RH_version
definitions
*
* 30-Sep-2001 16.29.29 -36000 0.02 David M.
Balean
*
* Added terminal quotes for the contact
address...
*
* 30-Sep-2001 16.29.29 -36000 0.03 David M.
Balean
*
* Trying "Contact"
again...
*
* 30-Sep-2001 16.29.29 -36000 0.04 David M.
Balean
*
* Should have fixed the contact
bug...
*
* 30-Sep-2001 16.29.29 -36000 0.05 David M.
Balean
*
* Minor
changes
*
* 30-Sep-2001 16.29.29 -36000 0.06 David M.
Balean
*
* Improved
logging
*
* 30-Sep-2001 16.29.29 -36000 0.07 David M.
Balean
*
* Fixed the double credits header entry in the log
file
*
* 30-Sep-2001 16.29.29 -36000 0.08 David M.
Balean
*
* Changed FrontPanel to pass correct flag to get
environment
*
* 30-Sep-2001 16.29.29 -36000 0.09 David M.
Balean
*
* Fixed "flag" to Project
Environment
*
* 30-Sep-2001 16.29.29 -36000 0.10 David M.
Balean
*
* ReadEnv didn't get the incrementing
choices...
*
* 30-Sep-2001 16.29.29 -36000 0.11 David M.
Balean
*
* Now opens the logfile as default, eliminates later if not required *
* 15-Oct-2001 21.42.43 -36000 0.12 David M.
Balean
*
* Added TimeZn to headings and lined them up better in WriteDTVA() *
* 19-Oct-2001 15.03.05 -36000 0.13 David M.
Balean
*
* Changes to logging
functions
*
* 20-Aug-2004 12.10.29 -36000 0.18 David M.
Balean
*
* Several functions deleted or moved
elsewhere
*
*
*
*RevHead_End
*
****************************************************************************/
Example - part of a changelog file
2010-04-01 12:15:25 David M. Balean <linprogs@balean.net>
* RevHead-4.2.8
Fixed the select bug in file requester at last!
Partial re-write of "entrylist" to include duplicated buttons
* requester.h 2010-03-31
22:23:58 David M. Balean
<linprogs@balean.net>
* defaults.cpp 2010-03-30
17:42:46 David M. Balean
<linprogs@balean.net>
* requester.cpp 2010-04-01
11:47:38 David M. Balean
<linprogs@balean.net>
Fixed select bug in 32 bit by using "row-activated" signal.
Needed for double clicks instead of "button-pressed".
* entrylist.h 2010-03-30
14:11:50 David M. Balean
<linprogs@balean.net>
* getproject.cpp 2010-03-30
14:02:54 David M. Balean
<linprogs@balean.net>
* defaults.cpp 2010-03-30
13:55:42 David M. Balean
<linprogs@balean.net>
* entrylist.cpp 2010-03-30
14:11:19 David M. Balean
<linprogs@balean.net>
Largely rewritten to include delete, pre & post insert and append line
* complain.cpp 2010-03-28 14:35:35
David M. Balean <linprogs@balean.net>
* revhead.h 2010-03-29
21:35:22 David M. Balean
<linprogs@balean.net>
* filedetails.h 2010-03-29
13:02:15 David M. Balean
<linprogs@balean.net>
* environment.cpp 2010-03-30
13:58:22 David M. Balean
<linprogs@balean.net>
* getproject.h 2010-03-29
13:07:20 David M. Balean
<linprogs@balean.net>
* environment.h 2010-03-30
11:58:05 David M. Balean
<linprogs@balean.net>
* filedetails.cpp 2010-03-30
14:11:50 David M. Balean
<linprogs@balean.net>
* defaults.h 2010-03-29
12:56:54 David M. Balean
<linprogs@balean.net>
* requester.cpp 2010-03-27
19:15:00 David M. Balean
<linprogs@balean.net>
2010-03-25 17:33:16 David M. Balean <linprogs@balean.net>
* RevHead-4.2.7
User can now choose the path for each version file.
If none chosen, the first directory with that file type is used.
Default is the project directory.
Some buttons now with images and coloured.
Now works OK on a smaller screen (EeePC).
* update.cpp 2010-03-20
09:53:17 David M. Balean
<linprogs@balean.net>
Added the version files' paths.
* requester.h 2010-03-24
13:02:36 David M. Balean
<linprogs@balean.net>
New File Summary:-
Header for requester.cpp
Note that in this example two files (defaults.cpp, requester.cpp) occur
more than once under 2010-04-01 12:15:25. This is because revhead was updated using the same
project version number more than once. The project date on the first line would have
been updated.
Example of a version file for C / C
/* RH_version.h */
/* Use- #include "RH_version.h" -to include this in a source file */
#ifndef __RH_VERSION_H__
#define __RH_VERSION_H__
#define RH_VERSION_STRING "RevHead-4.2.9 (C) David M. Balean Monday 27th June 2011"
#define RH_PROJECT_NAME "RevHead"
#define RH_PROJECT_VERSION "4.2.9"
#define RH_COPYRIGHT_OWNER "David M. Balean"
#define RH_PROJECT_COPYRIGHT "This program is free software; you can redistribute it and/or modify it\n" \
"under the terms of the GNU General Public License as published by\n" \
"the Free Software Foundation, either version 3 of the License or,\n" \
"(at your option) any later version.\n" \
"This program is distributed in the hope that it will be useful,\n" \
"but WITHOUT ANY WARRANTY; without even the implied warranty of\n" \
"MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n" \
"See the GNU General Public License for more details.\n" \
"You should have received a copy of the GNU General Public License\n" \
"along with this program. If not, see
<http://www.gnu.org/licenses/>."
#define RH_PROJECT_CONTACT "email: linprogs@balean.net\n" \
"snail: D.M. Balean, 44 Wyong Road, Killarney Vale, N.S.W. 2261,
AUSTRALIA\n" \
"URL: http://balean.net/linprogs"
#define RH_PROJECT_DATE "Monday 27th June 2011"
#endif
Download revhead-4.3.0.tar.gz HERE
(size 1.5 MB - the source files including rpm spec file)
OR
Download revhead-4.3.0-1.fc18.x86_64.rpm HERE
(size 1.1 MB - the Fedora 18 x86_64 binary rpm)
THE END