1.\" $OpenBSD: rcsdiff.1,v 1.29 2010/04/07 09:39:14 lum Exp $ 2.\" 3.\" Copyright (c) 2005 Joris Vink <joris@openbsd.org> 4.\" All rights reserved. 5.\" 6.\" Permission to use, copy, modify, and distribute this software for any 7.\" purpose with or without fee is hereby granted, provided that the above 8.\" copyright notice and this permission notice appear in all copies. 9.\" 10.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 11.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 12.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR 13.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 14.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 15.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF 16.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 17.Dd $Mdocdate: April 7 2010 $ 18.Dt RCSDIFF 1 19.Os 20.Sh NAME 21.Nm rcsdiff 22.Nd compare RCS revisions 23.Sh SYNOPSIS 24.Nm 25.Op Fl cnquV 26.Op Fl k Ns Ar mode 27.Op Fl r Ns Ar rev 28.Op Fl x Ns Ar suffixes 29.Op Fl z Ns Ar tz 30.Op Ar diff_options 31.Ar 32.Sh DESCRIPTION 33The 34.Nm 35program is used to compare revisions of RCS files, 36in much the same way as the 37.Xr diff 1 38utility. 39Differences between two specific revisions can be requested, 40as well as differences between the current working file and 41the latest revision of the default branch. 42.Pp 43It is not possible to display differences between entire directories, 44or differences between more than two files. 45All diffs produced are in the standard diff format, 46unless the 47.Fl u 48option is specified, 49which produces unified diffs. 50.Pp 51.Nm 52also supports 53keyword substitution \(en 54see the 55.Xr rcs 1 56man page for more information. 57.Pp 58The following options are supported: 59.Bl -tag -width Ds 60.It Fl c 61Produces a diff with three lines of context. 62See 63.Xr diff 1 64for more information. 65.It Fl k Ns Ar mode 66Specify the keyword substitution mode. 67.It Fl n 68Produces a diff in the same format that is used in the RCS files. 69.It Fl q 70Be quiet about reporting. 71.It Fl r Ns Ar rev 72Produces a diff with respect to revision 73.Ar rev . 74This option should be specified twice to generate a diff 75between two specific revisions. 76If only one revision is specified, 77diffing is done between that revision and 78the current working file. 79.It Fl u 80Produces a unified diff with three lines of context. 81See 82.Xr diff 1 83for more information. 84.It Fl V 85Print RCS's version number. 86.It Fl x Ns Ar suffixes 87Specifies the suffixes for RCS files. 88Suffixes should be separated by the 89.Sq / 90character. 91.It Fl z Ns Ar tz 92Specify the date output format. 93.It Ar diff_options 94Most of the options documented in 95.Xr diff 1 96may also be specified. 97.El 98.Sh ENVIRONMENT 99.Bl -tag -width RCSINIT 100.It Ev RCSINIT 101If set, this variable should contain a list of space-delimited options that 102are prepended to the argument list. 103.It Ev TMPDIR 104When set, this variable specifies the directory where temporary files 105are to be created. 106The default is set to 107.Pa /tmp . 108.El 109.Sh EXAMPLES 110Compare the latest revision of the default branch with the content of 111working file 112.Pa foo.c : 113.Pp 114.Dl $ rcsdiff foo.c 115.Pp 116Compare revision 1.7 and 1.8 of file 117.Pa foo.c 118and ignore differences in keyword values: 119.Pp 120.Dl $ rcsdiff -kk -r1.7 -r1.8 foo.c 121.Sh DIAGNOSTICS 122The 123.Nm 124utility exits with one of the following values: 125.Pp 126.Bl -tag -width Ds -compact -offset indent 127.It 0 128No differences were found. 129.It 1 130Differences were found. 131.It 2 132An error occurred. 133.El 134.Sh SEE ALSO 135.Xr ci 1 , 136.Xr co 1 , 137.Xr diff 1 , 138.Xr ident 1 , 139.Xr rcs 1 , 140.Xr rcsclean 1 , 141.Xr rcsmerge 1 , 142.Xr rlog 1 143.Sh STANDARDS 144The flag 145.Op Fl T 146has no effect and is provided 147for compatibility only. 148