summaryrefslogtreecommitdiffstats
path: root/textproc/cdiff
diff options
context:
space:
mode:
authoreivind <eivind@FreeBSD.org>2002-03-10 22:01:55 +0000
committereivind <eivind@FreeBSD.org>2002-03-10 22:01:55 +0000
commit95c02730343f0ad3fcf71820e2d9be4fd2cbe8af (patch)
tree0a84d58d8648e21d2087eba01b00817beba07ec7 /textproc/cdiff
parentc9d758d6fc57db86081dd2c626e4f870da75eff4 (diff)
downloadFreeBSD-ports-95c02730343f0ad3fcf71820e2d9be4fd2cbe8af.zip
FreeBSD-ports-95c02730343f0ad3fcf71820e2d9be4fd2cbe8af.tar.gz
Update to 1.4. This adds support for "cvs annotate"
Diffstat (limited to 'textproc/cdiff')
-rw-r--r--textproc/cdiff/Makefile2
-rw-r--r--textproc/cdiff/src/cdiff.16
-rw-r--r--textproc/cdiff/src/cdiff.sh7
3 files changed, 12 insertions, 3 deletions
diff --git a/textproc/cdiff/Makefile b/textproc/cdiff/Makefile
index f519fe0..ec80ff9 100644
--- a/textproc/cdiff/Makefile
+++ b/textproc/cdiff/Makefile
@@ -8,7 +8,7 @@
#
PORTNAME= cdiff
-PORTVERSION= 1.3
+PORTVERSION= 1.4
CATEGORIES= textproc
MASTER_SITES= # none
DISTFILES= # none
diff --git a/textproc/cdiff/src/cdiff.1 b/textproc/cdiff/src/cdiff.1
index eaa617a..551928a 100644
--- a/textproc/cdiff/src/cdiff.1
+++ b/textproc/cdiff/src/cdiff.1
@@ -42,6 +42,7 @@ files and URLs, adds color codes, expands tabs to 8 spaces, and passes the
results to
.Xr less 1 .
If used on a color terminal, it makes diffs much easier to read.
+There is also handling of "cvs annotate" in it.
.Sh AUTHORS
.Nm
was written by
@@ -50,13 +51,14 @@ based on a sed line somebody passed around. The code is (much) smaller than
this man page.
.Sh SEE ALSO
.Xr diff 1 ,
-.Xr less 1 .
+.Xr less 1 ,
+.Xr cvs 1 .
.Sh BUGS
.Nm
assumes standard ANSI color escape sequences (as used by xterm and most other
commonly used terminals), rather than using
.Xr curses 3 .
-
+.Pp
.Nm
should really be a large and complex C program based on
.Xr less 1
diff --git a/textproc/cdiff/src/cdiff.sh b/textproc/cdiff/src/cdiff.sh
index 097af55..3823d3b 100644
--- a/textproc/cdiff/src/cdiff.sh
+++ b/textproc/cdiff/src/cdiff.sh
@@ -22,4 +22,11 @@ s/^(\*\*\* \d+,\d+ *\*\*\*.*)$/\033[1m$1\033[m/o;
s/^(\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*)$/\033[1m$1\033[m/o;
s/^(!.*)$/\033[35m$1\033[m/o;
s/^(@@.*$)/\033[1m$1\033[m/o;
+if (/^1.(\d+)(\s+\(\w+\s+\d{2}-\w{3}-\d{2}\):\s)(.*)/) {
+ $lastcol = $lastcol || 0;
+ $lastcol++ if defined($lastrev) && $lastrev != $1;
+ $lastrev = $1;
+ $lastcol %= 6;
+ $_ = "\033[3" . ($lastcol + 1) . "m1.$1$2\033[m$3\n";
+}
' | less -R
OpenPOWER on IntegriCloud