There are many simple tasks that one would like to make when using
prcs.
This project, which language is mandatorily Python=, consists mainly
in writing a PRJ parser, and a command line parser. Afterwards, many
services can be implemented.
We should have the wrapper support the hierarchical
--help support of
prcs. So "modules" implementing new "verbs" should have a description
method.
annotate: simulate CVS' feature
We really need to track the origin of a line...
beautify: clean up the PRJ file
- Remove old comments (files added, removed etc.)
- Sort the entries per directory
- Put the ChangeLog first for each directory (better for prcs diff).
checkin: Posting, Mailing
A means to add pre and post hooks on most commands (including existing commands)
would allow us to have news or mails sent automatically when a checkin is
performed.
Refuse any checkin that does not have a New-Version-Log.

Refuse any checkin when there are non ignored non registered
files (see "ufo" below).
clcheckin: Using ChangeLog to fill the New-Version-Log
Use
prcs itself to fetch the ChangeLog entry, and paste it into
the New-Version-Log log field of the PRJ file.
changelog: Create a dummy ChangeLog
It should be able to output a good starting point for completing a ChangeLog.
I current use
prcs2cl:
#! /usr/bin/perl -w
use Text::Wrap qw (fill);
my $files = `prcs diff -fNP |
sed -n 's,^Index: [^/]*/\\(.*\\)\$,\\1,gp' |
grep -v ChangeLog`;
chomp ($files);
$files =~ s/\s+/, /somg;
print fill ("\t* ", "\t* ", "$files: "), "\n";
It should be able to notice deleted, added and renamed files, and to
create appropriate ChangeLog entries.
It should look at what is already in the ChangeLog to avoid
suggesting something that has already been handled.
checkout: Touch the files
One major difference between CVS and PRCS is that the former understands
nothing to timestamps, hence all the problems that people working on
Autoconf, Automake etc. experience.
Fortunately, PRCS keeps the timestamps, and therefore, when you checkout a
projects, generated files are younger than their sources (whereas with
CVS you just get some random order as the files get as timestamp their
checkout date).
But it is sometimes painful when you backtrack to a previous revision:
the old files are checked out with their old stamps and as a result, running
make will just not update the project!
We need
prcs checkout -t or
prcs checkout --touch that would check
out files at the current time.
cvssync: Synchronize with CVS
Basically, it means making sure that all the files under CVS are under
PRCS, fetching the ChangeLog with cvs diff, and using them as a
New-Version-Log for the prcs checkin.
diff: Improving the output
Maybe the basic functions of prdiff should be moved in here. We should have
something equivalent to
diff-ignore. Make sure the ChangeLogs changes are put first in the list.
ignore: Easier extension for Populate-Ignore
Several ideas:
-
.cvsignore files: have a means to import them
- builtins: have sets ready to use for autotool junks, LaTeX crap etc.
- Makefile.am: using
CLEANFILES too.
mv: Renaming/Moving Files
Instead of the ad hoc
prcs-mv, one would like to be able to run
prcs mv foo bar, but also
prcs mv src/getopt*.c src/getopt.h lib/.
ufo: List the non Unknown Files Objects
prcs populate -dn is useful, but would be much more if it there were
not all that noise on the screen ("ignoring blah blah").
In addition, having the lists of these
files without "adding blah blah" around it. In clear, a plain list of files!
I use the following simple but extremely useful script:
#! /bin/sh
prcs populate -dn |
sed -n "s/^prcs: Added \`\([^\']*\).*$/\1/gp" |
sort
A wellcome addition would be something like
-0 in find: use
\0 to
separate the files, instead of
\n. Also, using something like
pr
when
isattty can improve the result.
Well, of course, an initial task is to find a better name.
--
AkimDemaille - 27 Feb 2003
to top