Login | Register
My pages Projects Community openCollabNet

Discussions > cvs > CVS update: /svnutils/trunk/, /svnutils/trunk/src/

svnutils
Discussion topic

Back to topic list

CVS update: /svnutils/trunk/, /svnutils/trunk/src/

Author sunny256
Full name Øyvind A. Holm
Date 2004-10-25 19:22:55 PDT
Message User: sunny256
Date: 04/10/25 19:22:55

Added:
 /svnutils/trunk/src/
  sident

Modified:
 /svnutils/trunk/
  CONTENTS

Log:
 r85 | sunny256 | 2004-10-26 02:20:59 +0000 (Tue, 26 Oct 2004) | 8 lines
 
 Added the sident script. A replacement for ident(1).
 
 * /trunk/src/sident
   New script.
 
 * /trunk/CONTENTS
   Added sident to the file list.

File Changes:

Directory: /svnutils/trunk/
===========================

File [changed]: CONTENTS
Url: http://svnutils.tigr​is.org/source/browse​/svnutils/trunk/CONT​ENTS?r1=1.9&r2=1​.10
Delta lines: +5 -1
-------------------
--- CONTENTS 23 Oct 2004 19:50:02 -0000 1.9
+++ CONTENTS 26 Oct 2004 02:22:54 -0000 1.10
@@ -26,6 +26,10 @@
     finds the root revision of the branch — the revision from which it
     was made. Especially good for investigating tags. What revision of
     the parent branch was this tag made from?
+ - sident
+ A better (IMHO) ident(1). Does not abort on directories or other
+ non-files, limits the output to known keywords by CVS and
+ Subversion, and also lists compressed keywords.
   - svndiff
     Script for looking at differences in a directory tree. Uses
     vimdiff(1) as default, but can also use other diff programs for
@@ -59,5 +63,5 @@
       backup program, but let’s first see if there are any other wheels
       around that’s already invented.
 
-$Id: CONTENTS 80 2004-10-22 00:52:00Z sunny256 $
+$Id: CONTENTS 85 2004-10-26 02:20:59Z sunny256 $
 vim: set tw=72 ts=2 sw=2 sts=2 et fo+=w fenc=UTF-8 :

Directory: /svnutils/trunk/src/
===============================

File [added]: sident
Url: http://svnutils.tigr​is.org/source/browse​/svnutils/trunk/src/​sident?rev=1.1&c​ontent-type=text/vnd​.viewcvs-markup
Added lines: 132
----------------
#!/usr/bin/perl -w

#===================​====================​====================​============
# $Id: sident 85 2004-10-26 02:20:59Z sunny256 $
# Lists RCS-like keywords in files. Replacement for ident(1).
#
# Character set: UTF-8
# ©opyleft 2004– Øyvind A. Holm <sunny at sunbase dot org>
# License: GNU General Public License, see end of file for legal stuff.
#===================​====================​====================​============

use strict;

$| = 1;

use Getopt::Std;
our ($opt_h) = (0);
getopts('h') || die("Option error. Use -h for help.\n");

my @Keywords = (
                "Id",
                "Author", "LastChangedBy",
                "Date", "LastChangedDate",
                "LastChangedRevision", "Revision", "Rev",
                "URL", "HeadURL"
               );
my $Keyw = join('|', @Keywords); # Used in regexps

$opt_h && usage(0);

for (@ARGV) {
    my @Out = ();
    my $File = $_;
    if (open(FromFP, "<$File")) {
        while (<FromFP>) {
            s/(\$($Keyw)\$)/push(@Out, " $1\n")/ge;
            s/(\$($Keyw): .*? \$)/push(@Out, " $1\n")/ge;
        }
        if (scalar(@Out)) {
            print("\n$File:\n");
            for (@Out) {
                print($_);
            }
        }
    }
}

sub usage {
    # Send the help message to stdout {{{
    my $Retval = shift;
    print(<<END);

Usage:

    sident file [files [...]]

Lists RCS-like keywords in a file.

END
    exit($Retval);
    # }}}
}

__END__

# Plain Old Documentation (POD) {{{

=pod

=head1 NAME



=head1 REVISION

$Id: sident 85 2004-10-26 02:20:59Z sunny256 $

=head1 SYNOPSIS



=head1 DESCRIPTION



=head1 OPTIONS

=over 4

=item B<-h>

Print a brief help summary.

=back

=head1 BUGS



=head1 AUTHOR

Made by Øyvind A. Holm S<E<lt>sunny _AT_ sunbase.orgE<gt>>.

=head1 COPYRIGHT

Copyleft © Øyvind A. Holm &lt;sunny@sunbas​e.org&gt;
This is free software; see the file F<COPYING> for legalese stuff.

=head1 LICENCE

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 2 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, write to the Free Software Foundation, Inc.,
59 Temple Place, Suite 330, Boston, MA 02111-1307 USA

=head1 SEE ALSO

=cut

# }}}

# vim: set fenc=UTF-8 ft=perl fdm=marker ts=4 sw=4 sts=4 et fo+=w :
# End of file $Id: sident 85 2004-10-26 02:20:59Z sunny256 $




--------------------​--------------------​--------------------​---------
To unsubscribe, e-mail: cvs-unsubscribe@svnu​tils.tigris.org
For additional commands, e-mail: cvs-help at svnutils dot tigris dot org

« Previous message in topic | 1 of 1 | Next message in topic »

Messages

Show all messages in topic

CVS update: /svnutils/trunk/, /svnutils/trunk/src/ sunny256 Øyvind A. Holm 2004-10-25 19:22:55 PDT
Messages per page: