OpenBSD CVS

CVS log for src/usr.bin/cvs/rcs.c


[BACK] Up to [local] / src / usr.bin / cvs

Request diff between arbitrary revisions


Default branch: MAIN


Revision 1.321 / (download) - annotate - [select for diffs], Mon Dec 26 19:16:00 2022 UTC (16 months, 3 weeks ago) by jmc
Branch: MAIN
CVS Tags: OPENBSD_7_5_BASE, OPENBSD_7_5, OPENBSD_7_4_BASE, OPENBSD_7_4, OPENBSD_7_3_BASE, OPENBSD_7_3, HEAD
Changes since 1.320: +2 -2 lines
Diff to previous 1.320 (colored)

spelling fixes; from paul tagliamonte
amendments to his diff are noted on tech

Revision 1.320 / (download) - annotate - [select for diffs], Mon Oct 19 19:51:20 2020 UTC (3 years, 6 months ago) by naddy
Branch: MAIN
CVS Tags: OPENBSD_7_2_BASE, OPENBSD_7_2, OPENBSD_7_1_BASE, OPENBSD_7_1, OPENBSD_7_0_BASE, OPENBSD_7_0, OPENBSD_6_9_BASE, OPENBSD_6_9
Changes since 1.319: +9 -5 lines
Diff to previous 1.319 (colored)

Accommodate POSIX basename(3) that takes a non-const parameter and
may modify the string buffer.

ok florian@ millert@

Revision 1.319 / (download) - annotate - [select for diffs], Fri Jun 28 13:35:00 2019 UTC (4 years, 10 months ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_6_8_BASE, OPENBSD_6_8, OPENBSD_6_7_BASE, OPENBSD_6_7, OPENBSD_6_6_BASE, OPENBSD_6_6
Changes since 1.318: +2 -2 lines
Diff to previous 1.318 (colored)

When system calls indicate an error they return -1, not some arbitrary
value < 0.  errno is only updated in this case.  Change all (most?)
callers of syscalls to follow this better, and let's see if this strictness
helps us in the future.

Revision 1.318 / (download) - annotate - [select for diffs], Mon Aug 28 18:52:25 2017 UTC (6 years, 8 months ago) by millert
Branch: MAIN
CVS Tags: OPENBSD_6_5_BASE, OPENBSD_6_5, OPENBSD_6_4_BASE, OPENBSD_6_4, OPENBSD_6_3_BASE, OPENBSD_6_3, OPENBSD_6_2_BASE, OPENBSD_6_2
Changes since 1.317: +3 -7 lines
Diff to previous 1.317 (colored)

Use xasprintf() instead of calloc() + strlcpy() + memcpy() to
generate the log line.  Fixes a clang warning about using the wrong
size argument in strlcpy().  The existing code was safe but not
good strlcpy() practice.  OK otto@

Revision 1.317 / (download) - annotate - [select for diffs], Wed May 31 16:31:55 2017 UTC (6 years, 11 months ago) by joris
Branch: MAIN
Changes since 1.316: +3 -1 lines
Diff to previous 1.316 (colored)

Plug memleak in rcs_translate_tag() that was causing havoc on large repos.

Revision 1.316 / (download) - annotate - [select for diffs], Sat Oct 15 22:20:17 2016 UTC (7 years, 7 months ago) by millert
Branch: MAIN
CVS Tags: OPENBSD_6_1_BASE, OPENBSD_6_1
Changes since 1.315: +5 -5 lines
Diff to previous 1.315 (colored)

Quiet compiler warnings.  OK tomc@ tb@

Revision 1.315 / (download) - annotate - [select for diffs], Thu Oct 13 20:51:25 2016 UTC (7 years, 7 months ago) by fcambus
Branch: MAIN
Changes since 1.314: +27 -33 lines
Diff to previous 1.314 (colored)

rcsnum_free() -> free() cleanups. From Michael W. Bombardieri.

OK millert@

Revision 1.314 / (download) - annotate - [select for diffs], Thu Oct 13 20:31:45 2016 UTC (7 years, 7 months ago) by millert
Branch: MAIN
Changes since 1.313: +11 -12 lines
Diff to previous 1.313 (colored)

Fix revision lookups for branches.  Properly perform a revision
lookup so update -r actually works again, as a bonus throw a more
correct error when the revision could not be found.  From Joris Vink.

Revision 1.313 / (download) - annotate - [select for diffs], Thu Nov 5 09:48:21 2015 UTC (8 years, 6 months ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_6_0_BASE, OPENBSD_6_0, OPENBSD_5_9_BASE, OPENBSD_5_9
Changes since 1.312: +46 -72 lines
Diff to previous 1.312 (colored)

Remove xfree(), like already done for RCS. From Michael W Bombardieri,
ok mmcc

Revision 1.312 / (download) - annotate - [select for diffs], Fri Jan 16 06:40:07 2015 UTC (9 years, 4 months ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_5_8_BASE, OPENBSD_5_8, OPENBSD_5_7_BASE, OPENBSD_5_7
Changes since 1.311: +5 -3 lines
Diff to previous 1.311 (colored)

Replace <sys/param.h> with <limits.h> and other less dirty headers where
possible.  Annotate <sys/param.h> lines with their current reasons.  Switch
to PATH_MAX, NGROUPS_MAX, HOST_NAME_MAX+1, LOGIN_NAME_MAX, etc.  Change
MIN() and MAX() to local definitions of MINIMUM() and MAXIMUM() where
sensible to avoid pulling in the pollution.  These are the files confirmed
through binary verification.
ok guenther, millert, doug (helped with the verification protocol)

Revision 1.311 / (download) - annotate - [select for diffs], Wed Jan 8 13:23:55 2014 UTC (10 years, 4 months ago) by okan
Branch: MAIN
CVS Tags: OPENBSD_5_6_BASE, OPENBSD_5_6, OPENBSD_5_5_BASE, OPENBSD_5_5
Changes since 1.310: +2 -2 lines
Diff to previous 1.310 (colored)

unsigned char for ctype. ok deraadt

Revision 1.310 / (download) - annotate - [select for diffs], Mon May 2 22:22:54 2011 UTC (13 years ago) by chl
Branch: MAIN
CVS Tags: OPENBSD_5_4_BASE, OPENBSD_5_4, OPENBSD_5_3_BASE, OPENBSD_5_3, OPENBSD_5_2_BASE, OPENBSD_5_2, OPENBSD_5_1_BASE, OPENBSD_5_1, OPENBSD_5_0_BASE, OPENBSD_5_0
Changes since 1.309: +2 -2 lines
Diff to previous 1.309 (colored)

Fix bad return value check for rcsnum_cmp()

ok nickm@ xsa@

Revision 1.309 / (download) - annotate - [select for diffs], Sun Mar 27 14:15:02 2011 UTC (13 years, 1 month ago) by nicm
Branch: MAIN
Changes since 1.308: +9 -1 lines
Diff to previous 1.308 (colored)

Get rid of some warnings, from Michael W Bombardieri.

Revision 1.308 / (download) - annotate - [select for diffs], Thu Nov 11 21:00:59 2010 UTC (13 years, 6 months ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_4_9_BASE, OPENBSD_4_9
Changes since 1.307: +3 -3 lines
Diff to previous 1.307 (colored)

Nuke dead assignments and a dead function, from Michael W Bombardieri
using lint.

Revision 1.307 / (download) - annotate - [select for diffs], Sun Oct 31 15:37:34 2010 UTC (13 years, 6 months ago) by nicm
Branch: MAIN
Changes since 1.306: +5 -1 lines
Diff to previous 1.306 (colored)

init was passing a writable file descriptor into rcs_open which was then
failing to fdopen() it as readable. It doesn't need to pass in the fd at
all, so just change it to pass -1 which makes cvs init work again.

In fact, the fd should never need to be writable - it is only used for
reading. RCS_WRITE triggers a rewrite on the file on rcs_close() but
this is done by using a temporary and rename(2) (RCS_WRITE is a poor
name for the flag). So while here, add a couple of comments to hopefully
make it a little clearer. There is some confusion about how this is used
in other places but checking those is a separate issue.

with and ok tobias

Revision 1.306 / (download) - annotate - [select for diffs], Wed Oct 27 08:35:45 2010 UTC (13 years, 6 months ago) by tobias
Branch: MAIN
Changes since 1.305: +9 -15 lines
Diff to previous 1.305 (colored)

Merge -k and expand @@ parsing code between OpenCVS and OpenRCS, resulting
in a performance gain in OpenCVS in some "cvs update" scenarios.

ok zinovik

Revision 1.305 / (download) - annotate - [select for diffs], Wed Oct 20 19:53:53 2010 UTC (13 years, 7 months ago) by tobias
Branch: MAIN
Changes since 1.304: +7 -2 lines
Diff to previous 1.304 (colored)

Remove the need for rp_file in parser structure, instead keep only one
FILE pointer in RCSFILE.  This fixes some ugliness in closing an
fdopen()ed FILE and its underlying file descriptor.

Notified by Joerg Sonnenberger <joerg at britannica dot bec to de>

discussed with and ok nicm

Revision 1.304 / (download) - annotate - [select for diffs], Fri Oct 15 08:46:23 2010 UTC (13 years, 7 months ago) by tobias
Branch: MAIN
Changes since 1.303: +9 -3 lines
Diff to previous 1.303 (colored)

Fixed default branch handling and added support for branches in branches.

ok nicm

Revision 1.303 / (download) - annotate - [select for diffs], Fri Oct 15 08:44:12 2010 UTC (13 years, 7 months ago) by tobias
Branch: MAIN
Changes since 1.302: +20 -993 lines
Diff to previous 1.302 (colored)

Replaced RCS parser code with new rcsparse.{c,h}:
- be very strict about things we parse
- print more information about errors if they occur
- do not fatal() directly in parser, give caller a chance to react
- fix an rcs design issue when it comes to login names

tested by many on tech@

ok xsa

Revision 1.302 / (download) - annotate - [select for diffs], Wed Sep 29 09:23:54 2010 UTC (13 years, 7 months ago) by tobias
Branch: MAIN
Changes since 1.301: +5 -5 lines
Diff to previous 1.301 (colored)

Ensure that we always parse all deltas before expecting "desc" keyword.

ok nicm, zinovik

Revision 1.301 / (download) - annotate - [select for diffs], Sat Sep 11 07:26:00 2010 UTC (13 years, 8 months ago) by tobias
Branch: MAIN
Changes since 1.300: +2 -2 lines
Diff to previous 1.300 (colored)

Fixed typo.

ok ray, zinovik

Revision 1.300 / (download) - annotate - [select for diffs], Fri Sep 3 08:37:52 2010 UTC (13 years, 8 months ago) by tobias
Branch: MAIN
Changes since 1.299: +5 -5 lines
Diff to previous 1.299 (colored)

Rename RCSNUM's fd to rf_fd, complies to other variable names and
OpenRCS.

ok xsa, zinovik

Revision 1.299 / (download) - annotate - [select for diffs], Thu Sep 2 00:21:41 2010 UTC (13 years, 8 months ago) by tobias
Branch: MAIN
Changes since 1.298: +2 -3 lines
Diff to previous 1.298 (colored)

rcsnum_parse() allocates already an RCSNUM struct, so it's not needed to
copy it into a newly allocated one (which is even a memory leak).

ok zinovik

Revision 1.298 / (download) - annotate - [select for diffs], Sat Jul 31 11:37:37 2010 UTC (13 years, 9 months ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_4_8_BASE, OPENBSD_4_8
Changes since 1.297: +8 -1 lines
Diff to previous 1.297 (colored)

When looking for revision, break out of the loop at the end rather than
looping forever.

This prevents the server going into an infinite loop when the repository
is behind the checkout, but the behaviour is not correct (it is an error
rather than ignoring the file), so mark with an XXX for now. Some
underlying OpenCVS functions are too fatal()-happy and will probably
need to be changed in order to fix this properly.

Problem reported by sthen.

ok xsa ray

Revision 1.297 / (download) - annotate - [select for diffs], Fri Jul 23 21:46:05 2010 UTC (13 years, 9 months ago) by ray
Branch: MAIN
Changes since 1.296: +42 -42 lines
Diff to previous 1.296 (colored)

Reduce variable/function name and whitespace differences between
cvs/rcs.

OK xsa zinovik

Revision 1.296 / (download) - annotate - [select for diffs], Fri Jul 23 08:31:19 2010 UTC (13 years, 9 months ago) by ray
Branch: MAIN
Changes since 1.295: +7 -8 lines
Diff to previous 1.295 (colored)

Rename a bunch of variables and functions, removing the cvs_/rcs_
prefixes to reduce differences between cvs and rcs files.

"yes!" nicm

Revision 1.295 / (download) - annotate - [select for diffs], Wed Jul 21 09:22:17 2010 UTC (13 years, 10 months ago) by ray
Branch: MAIN
Changes since 1.294: +9 -15 lines
Diff to previous 1.294 (colored)

Only use username if author is NULL. Fixes "ci -wusername" when run
as root.

OK nicm

Revision 1.294 / (download) - annotate - [select for diffs], Tue Jul 13 20:41:55 2010 UTC (13 years, 10 months ago) by nicm
Branch: MAIN
Changes since 1.293: +2 -2 lines
Diff to previous 1.293 (colored)

PR 6423 fix for cvs too, requested by xsa@.

Revision 1.293 / (download) - annotate - [select for diffs], Fri Jul 9 20:07:05 2010 UTC (13 years, 10 months ago) by naddy
Branch: MAIN
Changes since 1.292: +3 -3 lines
Diff to previous 1.292 (colored)

Make cvs and rcs consistent in what characters they'll accept in
symbol/tag names: require the first character to be a letter and
allow any printable character (except the RCS specials $,.:;@)
afterwards.  This matches GNU cvs.

ok xsa@ zinovik@ stsp@

Revision 1.292 / (download) - annotate - [select for diffs], Tue Mar 30 16:56:32 2010 UTC (14 years, 1 month ago) by zinovik
Branch: MAIN
Changes since 1.291: +3 -7 lines
Diff to previous 1.291 (colored)

This diff synchronizes rcs parser code with OpenRCS.  It shrinks code by 3
lines, but does exactly the same thing.  It also removes unneeded variable
`buf'

ok deraadt@, xsa@

Revision 1.291 / (download) - annotate - [select for diffs], Sun Jun 7 08:39:13 2009 UTC (14 years, 11 months ago) by ray
Branch: MAIN
CVS Tags: OPENBSD_4_7_BASE, OPENBSD_4_7, OPENBSD_4_6_BASE, OPENBSD_4_6
Changes since 1.290: +2 -2 lines
Diff to previous 1.290 (colored)

More cvs/diff/rcs convergence:
1. Mostly variable/function renaming, SIZE_T_MAX->SIZE_MAX, and
spacing.
2. One strchr -> strncspn.
3. diff had a weird thing where it set file[12] = ofile[12] but
never updated file or ofile, then if file and ofile were different
it freed it. I removed it.

OK millert

Revision 1.290 / (download) - annotate - [select for diffs], Sat Jun 6 14:17:27 2009 UTC (14 years, 11 months ago) by ray
Branch: MAIN
Changes since 1.289: +2 -2 lines
Diff to previous 1.289 (colored)

Sync some rcsdiff changes to cvsdiff.  As a side effect,
cvs diff -t now works.  There should be no functional change
otherwise.

OK millert

Revision 1.289 / (download) - annotate - [select for diffs], Mon Mar 30 21:45:33 2009 UTC (15 years, 1 month ago) by joris
Branch: MAIN
Changes since 1.288: +2 -8 lines
Diff to previous 1.288 (colored)

kill rp_lines, we do not need it when parsing an RCS file.

incendently, commit made using opencvs entirely.
with permission from deraadt@

Revision 1.288 / (download) - annotate - [select for diffs], Wed Mar 25 21:23:17 2009 UTC (15 years, 1 month ago) by joris
Branch: MAIN
Changes since 1.287: +5 -9 lines
Diff to previous 1.287 (colored)

prevent a very difficult to reach, but possible use after free.
ok tobias@

Revision 1.287 / (download) - annotate - [select for diffs], Sun Mar 22 18:39:10 2009 UTC (15 years, 2 months ago) by tobias
Branch: MAIN
Changes since 1.286: +8 -6 lines
Diff to previous 1.286 (colored)

Properly free allocated memory in error case.

ok joris

Revision 1.286 / (download) - annotate - [select for diffs], Sat Feb 21 19:46:40 2009 UTC (15 years, 2 months ago) by tobias
Branch: MAIN
CVS Tags: OPENBSD_4_5_BASE, OPENBSD_4_5
Changes since 1.285: +2 -2 lines
Diff to previous 1.285 (colored)

Properly convert dates between timezones before comparison.

ok joris

Revision 1.285 / (download) - annotate - [select for diffs], Wed Feb 18 20:08:24 2009 UTC (15 years, 3 months ago) by joris
Branch: MAIN
Changes since 1.284: +2 -2 lines
Diff to previous 1.284 (colored)

fix off by one character when constructing $Mdocdate$.
problem found by todd@, ok sthen@

Revision 1.284 / (download) - annotate - [select for diffs], Sun Feb 15 13:40:33 2009 UTC (15 years, 3 months ago) by joris
Branch: MAIN
Changes since 1.283: +3 -1 lines
Diff to previous 1.283 (colored)

add our temporary RCS file to our temp_files worklist in case
for some reason we get interrupted before calling rename().

we hate leaving behind temporary files.

Revision 1.283 / (download) - annotate - [select for diffs], Fri Jan 2 00:11:01 2009 UTC (15 years, 4 months ago) by canacar
Branch: MAIN
Changes since 1.282: +8 -13 lines
Diff to previous 1.282 (colored)

Add format attributes to functions that use variable arguments and
make the code -Wformat=2 clean. ok joris@ xsa@

Revision 1.282 / (download) - annotate - [select for diffs], Sun Nov 9 08:51:43 2008 UTC (15 years, 6 months ago) by tobias
Branch: MAIN
Changes since 1.281: +2 -5 lines
Diff to previous 1.281 (colored)

Removed unneeded conversion from RCSNUM to string in rcs_rev_setlog.

oki joris@

Revision 1.281 / (download) - annotate - [select for diffs], Wed Sep 17 06:47:57 2008 UTC (15 years, 8 months ago) by reyk
Branch: MAIN
Changes since 1.280: +7 -3 lines
Diff to previous 1.280 (colored)

try getlogin() to get the real username when comitting files as root.
this gives better information in log messages when the user logged in
with a different uid and used sudo or su to become root. matches the
behaviour of gcvs except that we don't fallback to LOGNAME or USER
since getlogin() should not lie.

ok tobias@

Revision 1.280 / (download) - annotate - [select for diffs], Fri Sep 12 13:24:24 2008 UTC (15 years, 8 months ago) by tobias
Branch: MAIN
Changes since 1.279: +6 -12 lines
Diff to previous 1.279 (colored)

Plugged two memory leaks which could be encountered while using -r argument
with various CVS commands.

"seems to make sense" xsa@

Revision 1.279 / (download) - annotate - [select for diffs], Fri Sep 12 13:11:15 2008 UTC (15 years, 8 months ago) by tobias
Branch: MAIN
Changes since 1.278: +2 -2 lines
Diff to previous 1.278 (colored)

Be very conservative about state changes with "admin -s".  With GNU CVS
and current OpenCVS code it's possible to change a state in a way that
cannot be fixed with another admin call.

No objections xsa@

Revision 1.278 / (download) - annotate - [select for diffs], Thu Jun 26 21:31:40 2008 UTC (15 years, 10 months ago) by joris
Branch: MAIN
CVS Tags: OPENBSD_4_4_BASE, OPENBSD_4_4
Changes since 1.277: +8 -12 lines
Diff to previous 1.277 (colored)

plug a memleak in rcs_rev_getlines() - initially noticed & diff by
Igor Zinovik - but fixed in a better way by myself.

ok tobias@

Revision 1.277 / (download) - annotate - [select for diffs], Sun Jun 15 04:44:06 2008 UTC (15 years, 11 months ago) by joris
Branch: MAIN
Changes since 1.276: +4 -1 lines
Diff to previous 1.276 (colored)

if we are using RCS_PARSE_FULLY we can close the RCS file descriptor
as soon as we are done parsing, since we no longer need it for anything.

Revision 1.276 / (download) - annotate - [select for diffs], Sun Jun 15 04:38:52 2008 UTC (15 years, 11 months ago) by tobias
Branch: MAIN
Changes since 1.275: +30 -1 lines
Diff to previous 1.275 (colored)

Support the addition of new files in branches.

ok joris

Revision 1.275 / (download) - annotate - [select for diffs], Sat Jun 14 04:34:08 2008 UTC (15 years, 11 months ago) by tobias
Branch: MAIN
Changes since 1.274: +24 -5 lines
Diff to previous 1.274 (colored)

Conforming to RCS specification, it is possible but unlikely to encounter
an RCS file which has no head revision set.  Some commands actually can
work with them (log, status) so support these files. Fixes  A LOT of
possible segmentation faults.

ok joris

Revision 1.274 / (download) - annotate - [select for diffs], Sat Jun 14 03:58:29 2008 UTC (15 years, 11 months ago) by tobias
Branch: MAIN
Changes since 1.273: +10 -4 lines
Diff to previous 1.273 (colored)

Added support for sticky date set in CVS/Tag and CVS/Entries per directory.

ok joris

Revision 1.273 / (download) - annotate - [select for diffs], Sat Jun 14 03:19:15 2008 UTC (15 years, 11 months ago) by joris
Branch: MAIN
Changes since 1.272: +18 -8 lines
Diff to previous 1.272 (colored)

don't always re-open the same CVS/Entries file, instead keep the
last opened CVS/Entries around to operate on and close it whenever
we switch directory. gives us a small performance boost, obviously.

while doing this, switch the way we write revisions to disk by
using fwrite(3) so stuff can get written to disk in chunks
instead of writing everything line by line, another win.

with help from otto@
ok tobias@

Revision 1.272 / (download) - annotate - [select for diffs], Sat Jun 14 00:47:49 2008 UTC (15 years, 11 months ago) by tobias
Branch: MAIN
Changes since 1.271: +2 -2 lines
Diff to previous 1.271 (colored)

Fixed wrong function name in fatal call.

Revision 1.271 / (download) - annotate - [select for diffs], Thu Jun 12 17:06:17 2008 UTC (15 years, 11 months ago) by joris
Branch: MAIN
Changes since 1.270: +8 -2 lines
Diff to previous 1.270 (colored)

we should be able to handle symbol names that are also RCS tokens,
gnu cvs supports this and we should too really.

allows opencvs to properly checkout netbsd trees.

spotted & tested by rivo nurges
ok tobias@

Revision 1.270 / (download) - annotate - [select for diffs], Thu Jun 12 07:16:14 2008 UTC (15 years, 11 months ago) by joris
Branch: MAIN
Changes since 1.269: +2 -2 lines
Diff to previous 1.269 (colored)

completely kill the need for TMP_DIR when running checkout,
which gives us better performance among other things.

this is however disabled in a few cases:
1) whenever you run checkout over an existing tree (which acts as update)
2) whenever you specify -d or a module alias

we're planning on enabling this behaviour for case 2 in the future.

anoncvs sysadmins now love us even more.

ok tobias@

Revision 1.269 / (download) - annotate - [select for diffs], Tue Jun 10 20:30:17 2008 UTC (15 years, 11 months ago) by joris
Branch: MAIN
Changes since 1.268: +7 -1 lines
Diff to previous 1.268 (colored)

properly inherit file permissions.

reported & tested by phessler@
input otto@ deraadt@
ok tobias@

Revision 1.268 / (download) - annotate - [select for diffs], Tue Jun 10 16:05:04 2008 UTC (15 years, 11 months ago) by joris
Branch: MAIN
Changes since 1.267: +2 -2 lines
Diff to previous 1.267 (colored)

more characters are allowed in the symbol lists, found by tobias@

Revision 1.267 / (download) - annotate - [select for diffs], Tue Jun 10 05:01:36 2008 UTC (15 years, 11 months ago) by tobias
Branch: MAIN
Changes since 1.266: +2 -2 lines
Diff to previous 1.266 (colored)

We have a cvs_buf_puts implementation now, also use cvs_buf_putc instead
of cvs_buf_append where appropiate.

ok joris

Revision 1.266 / (download) - annotate - [select for diffs], Sun Jun 8 13:36:30 2008 UTC (15 years, 11 months ago) by tobias
Branch: MAIN
Changes since 1.265: +2 -2 lines
Diff to previous 1.265 (colored)

rcs_translate_tag mustn't fatal() if it cannot resolve a tag.  Breaks '-f'
in (r)annotate and (r)diff.

ok joris

Revision 1.265 / (download) - annotate - [select for diffs], Thu May 22 07:57:58 2008 UTC (16 years ago) by joris
Branch: MAIN
Changes since 1.264: +12 -4 lines
Diff to previous 1.264 (colored)

fix updating to tags pointing at branch revisions;
from Neels Janosch Hofmeyr and Stefan Sperling

Revision 1.264 / (download) - annotate - [select for diffs], Sat May 17 21:06:44 2008 UTC (16 years ago) by tobias
Branch: MAIN
Changes since 1.263: +59 -30 lines
Diff to previous 1.263 (colored)

Full support of branches added.  We lacked proper support of multiple
branch entry points in one revision as well as branches which started from
other branches.

ok joris

Revision 1.263 / (download) - annotate - [select for diffs], Sun May 11 12:13:41 2008 UTC (16 years ago) by tobias
Branch: MAIN
Changes since 1.262: +3 -1 lines
Diff to previous 1.262 (colored)

Memory leak in rcs_delta_stats plugged.

ok joris

Revision 1.262 / (download) - annotate - [select for diffs], Thu Mar 13 17:01:25 2008 UTC (16 years, 2 months ago) by joris
Branch: MAIN
Changes since 1.261: +2 -1 lines
Diff to previous 1.261 (colored)

properly initialize variables

Revision 1.261 / (download) - annotate - [select for diffs], Sun Mar 9 19:41:13 2008 UTC (16 years, 2 months ago) by tobias
Branch: MAIN
Changes since 1.260: +7 -1 lines
Diff to previous 1.260 (colored)

Fix segmentation fault when running checkout -p on a file without
specified head revision.

ok joris

Revision 1.260 / (download) - annotate - [select for diffs], Sat Mar 8 22:33:03 2008 UTC (16 years, 2 months ago) by joris
Branch: MAIN
Changes since 1.259: +12 -3 lines
Diff to previous 1.259 (colored)

better -j support

Revision 1.259 / (download) - annotate - [select for diffs], Sat Mar 8 20:52:36 2008 UTC (16 years, 2 months ago) by tobias
Branch: MAIN
Changes since 1.258: +3 -5 lines
Diff to previous 1.258 (colored)

Set umask (and cvs_umask) to system's umask in local and client mode.
Also zap umask(0);umask(mask); calls, we have cvs_umask for this.

ok joris

Revision 1.258 / (download) - annotate - [select for diffs], Sat Mar 8 20:26:34 2008 UTC (16 years, 2 months ago) by joris
Branch: MAIN
Changes since 1.257: +48 -20 lines
Diff to previous 1.257 (colored)

add checkout/update -j support.
still has some rough edges.

Revision 1.257 / (download) - annotate - [select for diffs], Sat Mar 8 11:53:36 2008 UTC (16 years, 2 months ago) by joris
Branch: MAIN
Changes since 1.256: +2 -2 lines
Diff to previous 1.256 (colored)

correct usage of lseek(2);

Revision 1.256 / (download) - annotate - [select for diffs], Sun Mar 2 19:31:08 2008 UTC (16 years, 2 months ago) by tobias
Branch: MAIN
CVS Tags: OPENBSD_4_3_BASE, OPENBSD_4_3
Changes since 1.255: +1 -31 lines
Diff to previous 1.255 (colored)

rcs_errno is gone: zap rcs_errstr() and rcs_errstrs[] as well.

ok joris

Revision 1.255 / (download) - annotate - [select for diffs], Sat Mar 1 21:29:37 2008 UTC (16 years, 2 months ago) by deraadt
Branch: MAIN
Changes since 1.254: +3 -3 lines
Diff to previous 1.254 (colored)

spacing

Revision 1.254 / (download) - annotate - [select for diffs], Sat Mar 1 20:03:56 2008 UTC (16 years, 2 months ago) by joris
Branch: MAIN
Changes since 1.253: +15 -71 lines
Diff to previous 1.253 (colored)

goodbye rcs_errno - we didnt use you and you wont be missed

Revision 1.253 / (download) - annotate - [select for diffs], Thu Feb 28 21:55:48 2008 UTC (16 years, 2 months ago) by tobias
Branch: MAIN
Changes since 1.252: +4 -1 lines
Diff to previous 1.252 (colored)

RCS files can have a default expansion mode, keep this in mind for
update -A and -k.

spotted by and ok joris

Revision 1.252 / (download) - annotate - [select for diffs], Thu Feb 28 20:24:25 2008 UTC (16 years, 2 months ago) by joris
Branch: MAIN
Changes since 1.251: +1 -3 lines
Diff to previous 1.251 (colored)

kill way out of date stuff

Revision 1.251 / (download) - annotate - [select for diffs], Wed Feb 27 22:34:04 2008 UTC (16 years, 2 months ago) by joris
Branch: MAIN
Changes since 1.250: +14 -6 lines
Diff to previous 1.250 (colored)

prevent file races

ok tobias@

Revision 1.250 / (download) - annotate - [select for diffs], Wed Feb 20 09:19:04 2008 UTC (16 years, 3 months ago) by joris
Branch: MAIN
Changes since 1.249: +10 -3 lines
Diff to previous 1.249 (colored)

make sure we use the default branch (if available)
in rcs_translate_tag() if we are looking for a revision on the trunk.

fixes inconsistancy with gnu cvs.

problem noticed by brad@

Revision 1.249 / (download) - annotate - [select for diffs], Mon Feb 11 20:33:11 2008 UTC (16 years, 3 months ago) by tobias
Branch: MAIN
Changes since 1.248: +4 -4 lines
Diff to previous 1.248 (colored)

Cleanup buf implementation:

* Don't check for NULL on buffer creation, because it calls fatal() when
  something's wrong.
* All buffers are supposed to expand if there is no space left in them,
  so zap flags as well.
* Remove code that is now dead.

OK joris@

> Inspired by a diff from Igor Zinovik about unchecked return value.

Revision 1.248 / (download) - annotate - [select for diffs], Sun Feb 10 10:21:42 2008 UTC (16 years, 3 months ago) by joris
Branch: MAIN
Changes since 1.247: +2 -2 lines
Diff to previous 1.247 (colored)

properly initialize cvs_specified_date so we dont end up with
random stuff going on

Revision 1.247 / (download) - annotate - [select for diffs], Sat Feb 9 13:41:22 2008 UTC (16 years, 3 months ago) by joris
Branch: MAIN
Changes since 1.246: +2 -2 lines
Diff to previous 1.246 (colored)

fix error msg;

Revision 1.246 / (download) - annotate - [select for diffs], Sat Feb 9 11:17:02 2008 UTC (16 years, 3 months ago) by tobias
Branch: MAIN
Changes since 1.245: +74 -7 lines
Diff to previous 1.245 (colored)

Get in initial support for checkout -D.  Works fine with -r support right
now.

OK joris@

Revision 1.245 / (download) - annotate - [select for diffs], Sun Feb 3 16:59:11 2008 UTC (16 years, 3 months ago) by tobias
Branch: MAIN
Changes since 1.244: +2 -8 lines
Diff to previous 1.244 (colored)

Do not unify this "-fr UNKNOWN" handling, it breaks commands which have
to work fine and just ignore files which don't have requested symbol.

Spotted by joris@.

Revision 1.244 / (download) - annotate - [select for diffs], Sat Feb 2 16:59:48 2008 UTC (16 years, 3 months ago) by tobias
Branch: MAIN
Changes since 1.243: +8 -2 lines
Diff to previous 1.243 (colored)

Although this doesn't comply to common sense, it complies to GNU cvs. All
commands which supply -f and -r have this weirdness: an unknown
symbol leads to fatal instead of head revision.

OK xsa@

Revision 1.243 / (download) - annotate - [select for diffs], Thu Jan 31 22:19:36 2008 UTC (16 years, 3 months ago) by tobias
Branch: MAIN
Changes since 1.242: +3 -1 lines
Diff to previous 1.242 (colored)

Handle magic branch numbers in OpenCVS as well.

OK joris@

Revision 1.242 / (download) - annotate - [select for diffs], Thu Jan 31 21:49:17 2008 UTC (16 years, 3 months ago) by joris
Branch: MAIN
Changes since 1.241: +6 -3 lines
Diff to previous 1.241 (colored)

in some cases we did not return a copy of the resulting RCSNUM
towards the caller, which expects a copy (and frees it when done).

ok tobias@

Revision 1.241 / (download) - annotate - [select for diffs], Thu Jan 31 20:29:16 2008 UTC (16 years, 3 months ago) by joris
Branch: MAIN
Changes since 1.240: +50 -1 lines
Diff to previous 1.240 (colored)

add changed lines support to log and rlog (the + and - stuff)
from Pierre Riteau;

Revision 1.240 / (download) - annotate - [select for diffs], Mon Jan 28 21:33:20 2008 UTC (16 years, 3 months ago) by tobias
Branch: MAIN
Changes since 1.239: +2 -1 lines
Diff to previous 1.239 (colored)

Properly free "rev".

> Diff from Igor Zinovik

Revision 1.239 / (download) - annotate - [select for diffs], Mon Jan 14 17:29:21 2008 UTC (16 years, 4 months ago) by tobias
Branch: MAIN
Changes since 1.238: +2 -2 lines
Diff to previous 1.238 (colored)

Changed xmalloc(n * m) pattern into xcalloc(n, m).

OK ray@, xsa@

> Diff from Igor Zinovik.

Revision 1.238 / (download) - annotate - [select for diffs], Sun Jan 13 11:11:08 2008 UTC (16 years, 4 months ago) by tobias
Branch: MAIN
Changes since 1.237: +2 -2 lines
Diff to previous 1.237 (colored)

Typos fixed.

OK xsa@

> Diff from Igor Zinovik.

Revision 1.237 / (download) - annotate - [select for diffs], Thu Jan 10 10:48:50 2008 UTC (16 years, 4 months ago) by tobias
Branch: MAIN
Changes since 1.236: +2 -54 lines
Diff to previous 1.236 (colored)

just for the record: I HATE Log

Revision 1.236 / (download) - annotate - [select for diffs], Thu Jan 10 10:15:48 2008 UTC (16 years, 4 months ago) by tobias
Branch: MAIN
Changes since 1.235: +34 -32 lines
Diff to previous 1.235 (colored)

Damnit, I should avoid this nasty Log word in a comment ...

Revision 1.235 / (download) - annotate - [select for diffs], Thu Jan 10 09:55:18 2008 UTC (16 years, 4 months ago) by tobias
Branch: MAIN
Changes since 1.234: +47 -6 lines
Diff to previous 1.234 (colored)

An empty -k option is invalid

Revision 1.234 / (download) - annotate - [select for diffs], Thu Jan 10 09:37:26 2008 UTC (16 years, 4 months ago) by tobias
Branch: MAIN
Changes since 1.233: +16 -3 lines
Diff to previous 1.233 (colored)

RCS files without head keyword mustn't segfault our implementation.  Only
command that supports such files is "cvs status", therefore properly handle
them in all other commands, too.

Revision 1.233 / (download) - annotate - [select for diffs], Thu Jan 10 09:35:02 2008 UTC (16 years, 4 months ago) by tobias
Branch: MAIN
Changes since 1.232: +148 -26 lines
Diff to previous 1.232 (colored)

Added support for keyword $Log$.  In order to support $Log$, new lines have
to be added which mustn't be expanded again (this log message for example
would loop forever due to $Log$ keywords in it).

Revision 1.232 / (download) - annotate - [select for diffs], Sun Jan 6 14:45:50 2008 UTC (16 years, 4 months ago) by tobias
Branch: MAIN
Changes since 1.231: +2 -2 lines
Diff to previous 1.231 (colored)

Branches are separated with \n\t in GNU rcs/cvs.
This makes regress tests easier to check with OpenCVS and GNU cvs.

OK xsa@

Revision 1.231 / (download) - annotate - [select for diffs], Sun Nov 11 14:02:35 2007 UTC (16 years, 6 months ago) by tobias
Branch: MAIN
Changes since 1.230: +200 -173 lines
Diff to previous 1.230 (colored)

Max. 80 chars per line in rcs_kwexp_line. Saved a tab by redoing

for (...) {
	if (something) {
		...
	}
}

into

for (...) {
	if (!something)
		continue;
	...
}

All other lines which were still too long have been splitted up.
No functional change (beside of if-statement).

Revision 1.230 / (download) - annotate - [select for diffs], Sun Nov 11 10:14:33 2007 UTC (16 years, 6 months ago) by tobias
Branch: MAIN
Changes since 1.229: +4 -1 lines
Diff to previous 1.229 (colored)

Do not (re)expand CVS keywords if it is requested to keep old keywords.

Revision 1.229 / (download) - annotate - [select for diffs], Sun Nov 11 10:01:41 2007 UTC (16 years, 6 months ago) by tobias
Branch: MAIN
Changes since 1.228: +6 -1 lines
Diff to previous 1.228 (colored)

Added CVS keyword "Locker". Although it is a dummy function, it's already
enough for OpenBSD's src/.

Revision 1.228 / (download) - annotate - [select for diffs], Sun Nov 11 09:49:47 2007 UTC (16 years, 6 months ago) by tobias
Branch: MAIN
Changes since 1.227: +6 -2 lines
Diff to previous 1.227 (colored)

Apply umask on RCS file modes.  The umask can be changed in CVSROOT/config
and should therefore be handled.

Revision 1.227 / (download) - annotate - [select for diffs], Thu Nov 8 20:43:42 2007 UTC (16 years, 6 months ago) by tobias
Branch: MAIN
Changes since 1.226: +10 -2 lines
Diff to previous 1.226 (colored)

Stick at GNU cvs output format of docdate.

OK niallo@

Revision 1.226 / (download) - annotate - [select for diffs], Thu Nov 8 20:37:40 2007 UTC (16 years, 6 months ago) by tobias
Branch: MAIN
Changes since 1.225: +10 -2 lines
Diff to previous 1.225 (colored)

Return latest revision of default branch when HEAD is requested and no
newer revisions are available (for example multiple imports).

Reported by ckuethe@, OK niallo@

Revision 1.225 / (download) - annotate - [select for diffs], Tue Oct 9 12:59:53 2007 UTC (16 years, 7 months ago) by tobias
Branch: MAIN
Changes since 1.224: +115 -2 lines
Diff to previous 1.224 (colored)

Added proper support for branch revisions in annotate.

OK niallo@, twice :)

Revision 1.224 / (download) - annotate - [select for diffs], Tue Oct 9 12:18:53 2007 UTC (16 years, 7 months ago) by tobias
Branch: MAIN
Changes since 1.223: +8 -3 lines
Diff to previous 1.223 (colored)

Return NULL if a revision has been supplied that is higher than HEAD.

This one and previous OK niallo@, "makes sense to me" xsa@

Revision 1.223 / (download) - annotate - [select for diffs], Tue Oct 9 12:16:29 2007 UTC (16 years, 7 months ago) by tobias
Branch: MAIN
Changes since 1.222: +9 -6 lines
Diff to previous 1.222 (colored)

Properly resolve branches, i.e. supplying branch base revision (e.g. 1.1.1)
should resolve to latest branch revision (e.g. 1.1.1.1).

Revision 1.222 / (download) - annotate - [select for diffs], Mon Sep 24 13:44:20 2007 UTC (16 years, 7 months ago) by joris
Branch: MAIN
Changes since 1.221: +13 -4 lines
Diff to previous 1.221 (colored)

add support to commit modified files to branches.

Revision 1.221 / (download) - annotate - [select for diffs], Mon Sep 24 11:18:43 2007 UTC (16 years, 7 months ago) by joris
Branch: MAIN
Changes since 1.220: +1 -19 lines
Diff to previous 1.220 (colored)

zap unused stuff, cleans it up a bit.

Revision 1.220 / (download) - annotate - [select for diffs], Sat Sep 22 15:41:46 2007 UTC (16 years, 8 months ago) by joris
Branch: MAIN
Changes since 1.219: +7 -3 lines
Diff to previous 1.219 (colored)

in rcs_translate_tag() do not fail when a tag resolved
to a normal revision instead of a branch, its perfectly valid.

Revision 1.219 / (download) - annotate - [select for diffs], Mon Sep 17 10:07:21 2007 UTC (16 years, 8 months ago) by tobias
Branch: MAIN
Changes since 1.218: +4 -3 lines
Diff to previous 1.218 (colored)

Imported atomicio interface.

Requested by ray@, OK joris@

Revision 1.218 / (download) - annotate - [select for diffs], Thu Sep 13 13:10:57 2007 UTC (16 years, 8 months ago) by tobias
Branch: MAIN
Changes since 1.217: +116 -15 lines
Diff to previous 1.217 (colored)

Added annotate support for local and remote repositories. Behaves like
GNU cvs but is a little faster.

OK joris@, ray@, xsa@

Revision 1.217 / (download) - annotate - [select for diffs], Fri Sep 7 23:05:04 2007 UTC (16 years, 8 months ago) by joris
Branch: MAIN
Changes since 1.216: +12 -1 lines
Diff to previous 1.216 (colored)

Sprinkle some magic so checkout/update -p works
in both local and server mode.

OK tobias@

Revision 1.216 / (download) - annotate - [select for diffs], Mon Aug 27 19:18:05 2007 UTC (16 years, 8 months ago) by xsa
Branch: MAIN
Changes since 1.215: +2 -2 lines
Diff to previous 1.215 (colored)

typo in error msg; from Igor Zinovik.

Revision 1.215 / (download) - annotate - [select for diffs], Tue Jul 3 13:22:43 2007 UTC (16 years, 10 months ago) by joris
Branch: MAIN
CVS Tags: OPENBSD_4_2_BASE, OPENBSD_4_2
Changes since 1.214: +7 -1 lines
Diff to previous 1.214 (colored)

Rework the way opencvs works in relation to files in the Attic/:

Previously, files in the 'Attic/' were linked into our filelist as being
'Attic/filename,v' this caused unneeded stress on certain functions
like cvs_file_classify() who had to do pointer voodoo to split out
the 'Attic/' part and do other very weird stuff to normalize the pathname
of these files.

Instead, we handle these files early in the start when we
build the fileslist in cvs_repository_getdir(). When encountering
the 'Attic/' directory, we recurse in it if required but instead of
using the 'Attic/' directory component as our base directory we stick
with the directory name where 'Attic/' resides in, resulting in the
correct filename while maintaining the correct RCSpath for the file.

This made the following things a lot easier:
(and in most cases actually fixed the below points)

- status with files in Attic/.
- checking out HEAD repositories with files in Attic/.
- checking out repositories with -rTAG.
- updating with -rTAG.

and as an added bonus the following now also works:

- correctly creating CVS/Tag in both local and remote mode thus
  allowing update/status/and more to work correctly with the tagged tree.
  (thanks to the correct handling of -rTAG cases).
- resetting tags with opencvs -A properly works too now.

This is a major step forward into the usability
of OpenCVS when it comes to maintaining multiple tagged trees, the next
logical step would be to fix commiting to branches.

enjoy you -stable cowards.

tested by myself, xsa, niallo and ckuethe
thanks guys!

Revision 1.214 / (download) - annotate - [select for diffs], Thu Jun 28 21:38:09 2007 UTC (16 years, 10 months ago) by xsa
Branch: MAIN
Changes since 1.213: +3 -3 lines
Diff to previous 1.213 (colored)

Sync revisions and time buffers size to be consistent with each others.
Simplifies further size tweaks if needed.
OK niallo@ ray@.

Revision 1.213 / (download) - annotate - [select for diffs], Fri Jun 1 17:47:47 2007 UTC (16 years, 11 months ago) by niallo
Branch: MAIN
Changes since 1.212: +64 -77 lines
Diff to previous 1.212 (colored)

add support for local and remote branch checkout.  for example,
cvs co -rOPENBSD_3_0 works now.
along the way, simplify and rationalise code and fix a few nits.

ok joris@ xsa@ ray@

Revision 1.212 / (download) - annotate - [select for diffs], Tue May 29 00:19:10 2007 UTC (16 years, 11 months ago) by ray
Branch: MAIN
Changes since 1.211: +3 -4 lines
Diff to previous 1.211 (colored)

Since xrealloc dies on failure it is safe to directly assign to the
original pointer.  Theo agrees, and so does the rest of the tree
(ssh, etc. all do this already).

Saves a bunch of variables and assignments.

OK niallo@

Revision 1.211 / (download) - annotate - [select for diffs], Sat May 26 20:58:36 2007 UTC (16 years, 11 months ago) by niallo
Branch: MAIN
Changes since 1.210: +13 -2 lines
Diff to previous 1.210 (colored)

add support for Mdocdate rcs keyword in opencvs too.
also add check for strftime return in date keyword parsing while here.
requested by jmc@, ok ray@

Revision 1.210 / (download) - annotate - [select for diffs], Thu Feb 22 06:42:09 2007 UTC (17 years, 2 months ago) by otto
Branch: MAIN
CVS Tags: OPENBSD_4_1_BASE, OPENBSD_4_1
Changes since 1.209: +10 -6 lines
Diff to previous 1.209 (colored)

general includes cleanup sweep. ok joris@ niallo@

Revision 1.209 / (download) - annotate - [select for diffs], Mon Feb 19 11:40:00 2007 UTC (17 years, 3 months ago) by otto
Branch: MAIN
Changes since 1.208: +13 -14 lines
Diff to previous 1.208 (colored)

Fix const inconsistencies, void pointer artithmetic and a few other
things. now gcc -Wall and lint are more happy. ok joris@ xsa@

Revision 1.208 / (download) - annotate - [select for diffs], Sun Feb 4 15:05:05 2007 UTC (17 years, 3 months ago) by otto
Branch: MAIN
Changes since 1.207: +2 -2 lines
Diff to previous 1.207 (colored)

Use the right HEADNAME. Sometimes compiler warnings should not be
ignored. ok xsa@ joris@

Revision 1.207 / (download) - annotate - [select for diffs], Thu Feb 1 20:36:21 2007 UTC (17 years, 3 months ago) by otto
Branch: MAIN
Changes since 1.206: +19 -84 lines
Diff to previous 1.206 (colored)

When writing an rcs file, create the temp file next to the target
file and then rename. Avoids inter-filesystem copy and fixes a
potential rcs file truncation when the target fileystem becomes full.
While there, use fchmod instead of chmod.  ok xsa@ joris@

Revision 1.206 / (download) - annotate - [select for diffs], Fri Jan 26 21:59:11 2007 UTC (17 years, 3 months ago) by otto
Branch: MAIN
Changes since 1.205: +4 -7 lines
Diff to previous 1.205 (colored)

more fixe size buffers on the stack. ok xsa@ joris@

Revision 1.205 / (download) - annotate - [select for diffs], Fri Jan 26 21:48:17 2007 UTC (17 years, 3 months ago) by xsa
Branch: MAIN
Changes since 1.204: +2 -1 lines
Diff to previous 1.204 (colored)

- support [-k mode] for the add command
- do not let the file keyword expension options (-k) disappear
from the Entries file when doing a commit/update/checkout
- be sure the expension mode gets written to the RCS file when a file
is added/committed in the first place
problems raised by otto@; tests/ok otto@ and joris@.

Revision 1.204 / (download) - annotate - [select for diffs], Fri Jan 26 11:19:44 2007 UTC (17 years, 3 months ago) by joris
Branch: MAIN
Changes since 1.203: +2 -2 lines
Diff to previous 1.203 (colored)

Handle CVS/Entries and file timestamp correctly so we do
not mistakenly see a file as Modified while it is not.

As a result, we can remove the very hackish cvs_hack_time() and
GNU cvs and opencvs should almost get along now.

lotsa help and okay The otto@

Revision 1.203 / (download) - annotate - [select for diffs], Thu Jan 25 19:32:56 2007 UTC (17 years, 3 months ago) by otto
Branch: MAIN
Changes since 1.202: +3 -1 lines
Diff to previous 1.202 (colored)

plug a leak if multiple expansions are done on a single line. ok
niallo@

Revision 1.202 / (download) - annotate - [select for diffs], Thu Jan 25 18:35:30 2007 UTC (17 years, 3 months ago) by niallo
Branch: MAIN
Changes since 1.201: +2 -1 lines
Diff to previous 1.201 (colored)

plug a memleak in keyword expansion.

ok joris@

Revision 1.201 / (download) - annotate - [select for diffs], Tue Jan 16 02:52:56 2007 UTC (17 years, 4 months ago) by joris
Branch: MAIN
Changes since 1.200: +2 -2 lines
Diff to previous 1.200 (colored)

sanitize what kind of symbols we can have in symbol names,
tested & found brad@

Revision 1.200 / (download) - annotate - [select for diffs], Sun Jan 14 23:10:56 2007 UTC (17 years, 4 months ago) by joris
Branch: MAIN
Changes since 1.199: +43 -266 lines
Diff to previous 1.199 (colored)

move things around in rcs_rev_getbuf() and rcs_rev_write_fd()
so that we do keyword expansion on-the-fly if required instead
of obtaining the revision in memory first, running over the revision
lines while expanding keywords and only then writing them to the fd
or memory buffer.

this drasticly decreases cpu usage by opencvs on very large trees (like src).

OK niallo@

Revision 1.199 / (download) - annotate - [select for diffs], Sat Jan 13 20:59:49 2007 UTC (17 years, 4 months ago) by joris
Branch: MAIN
Changes since 1.198: +1 -115 lines
Diff to previous 1.198 (colored)

nuke the the very evil rcs_getrev() stuff
discussed with niallo@

Revision 1.198 / (download) - annotate - [select for diffs], Sat Jan 13 05:09:17 2007 UTC (17 years, 4 months ago) by joris
Branch: MAIN
Changes since 1.197: +1 -2 lines
Diff to previous 1.197 (colored)

the memleak i thought i had fixed was in fact NOT a leak at all
and caused opencvs to crash so revert, oops?

Revision 1.197 / (download) - annotate - [select for diffs], Sat Jan 13 04:29:37 2007 UTC (17 years, 4 months ago) by joris
Branch: MAIN
Changes since 1.196: +18 -9 lines
Diff to previous 1.196 (colored)

- better error messages
- correclty use cvs_tagname, so that the tag from $CVSROOT/config
  will actually be expanded as a keyword.

Revision 1.196 / (download) - annotate - [select for diffs], Fri Jan 12 23:32:01 2007 UTC (17 years, 4 months ago) by niallo
Branch: MAIN
Changes since 1.195: +414 -14 lines
Diff to previous 1.195 (colored)

major re-work of the RCS api.  this results in 100x performance improvements in some places and much
reduced memory usage.  note that only checkout has been fully converted to use the new high-performance
functions.  other codepaths (e.g. update) still use the old method which is provided for backwards
compatibility.  we can convert the remaining slow bits over to the new api piece-by-piece.

"commit this, now" joris@
brad@ tested, too.

Revision 1.195 / (download) - annotate - [select for diffs], Fri Jan 12 19:28:12 2007 UTC (17 years, 4 months ago) by joris
Branch: MAIN
Changes since 1.194: +7 -3 lines
Diff to previous 1.194 (colored)

do not leak memory from rcs_head_get()

ok niallo@

Revision 1.194 / (download) - annotate - [select for diffs], Fri Jan 12 17:25:33 2007 UTC (17 years, 4 months ago) by joris
Branch: MAIN
Changes since 1.193: +16 -10 lines
Diff to previous 1.193 (colored)

complete binary support for opencvs,
adding/importing binary files now works too

partially taken from openrcs

Revision 1.193 / (download) - annotate - [select for diffs], Thu Jan 11 17:44:18 2007 UTC (17 years, 4 months ago) by niallo
Branch: MAIN
Changes since 1.192: +30 -22 lines
Diff to previous 1.192 (colored)

rework opencvs so that we can deal with binary files.  previously we assumed all files were ascii,
which broke things in real-world usage.  now a checkout of src should work, albeit using lots of
memory and cpu.  fixing this is the next step.

testing by many.
ok & some input joris@

Revision 1.192 / (download) - annotate - [select for diffs], Thu Dec 21 15:03:15 2006 UTC (17 years, 5 months ago) by niallo
Branch: MAIN
Changes since 1.191: +9 -9 lines
Diff to previous 1.191 (colored)

- plug memory leak in rcs_parse_delta()

ok joris@ ray@

Revision 1.191 / (download) - annotate - [select for diffs], Thu Dec 21 14:59:25 2006 UTC (17 years, 5 months ago) by niallo
Branch: MAIN
Changes since 1.190: +2 -1 lines
Diff to previous 1.190 (colored)

- plug memory leak in rcs_translate_tag()

ok joris@ ray@

Revision 1.190 / (download) - annotate - [select for diffs], Thu Dec 21 14:58:14 2006 UTC (17 years, 5 months ago) by niallo
Branch: MAIN
Changes since 1.189: +2 -1 lines
Diff to previous 1.189 (colored)

- plug memory leak in rcs_patch_lines()

ok joris@ ray@

Revision 1.189 / (download) - annotate - [select for diffs], Mon Dec 4 03:53:30 2006 UTC (17 years, 5 months ago) by niallo
Branch: MAIN
Changes since 1.188: +3 -1 lines
Diff to previous 1.188 (colored)

- fix crash when doing keyword expansion of zero-length buffers.

ok ray@

Revision 1.188 / (download) - annotate - [select for diffs], Wed Aug 23 20:28:00 2006 UTC (17 years, 8 months ago) by joris
Branch: MAIN
CVS Tags: OPENBSD_4_0_BASE, OPENBSD_4_0
Changes since 1.187: +13 -3 lines
Diff to previous 1.187 (colored)

pull in latest change from openrcs:
Add missing checks for EOF when parsing rcs file sections.
by millert@

Revision 1.187 / (download) - annotate - [select for diffs], Wed Aug 2 03:23:40 2006 UTC (17 years, 9 months ago) by ray
Branch: MAIN
Changes since 1.186: +60 -65 lines
Diff to previous 1.186 (colored)

Sync CVS's rcs_expand_keywords() and rcs_kwexp_buf() with RCS.

OK niallo@

Revision 1.186 / (download) - annotate - [select for diffs], Sun Jul 30 03:47:48 2006 UTC (17 years, 9 months ago) by ray
Branch: MAIN
Changes since 1.185: +28 -56 lines
Diff to previous 1.185 (colored)

Sync some whitespace changes from rcs.  No binary change.

Revision 1.185 / (download) - annotate - [select for diffs], Sat Jul 8 09:25:44 2006 UTC (17 years, 10 months ago) by ray
Branch: MAIN
Changes since 1.184: +3 -3 lines
Diff to previous 1.184 (colored)

Remove file mode argument from {cvs|rcs}_buf_write_stmp().  We
always set the temporary file to mode 600, which is already done
by mkstemp().

OK joris@ and xsa@ over a month ago.

Revision 1.184 / (download) - annotate - [select for diffs], Fri Jun 9 14:57:13 2006 UTC (17 years, 11 months ago) by xsa
Branch: MAIN
Changes since 1.183: +20 -1 lines
Diff to previous 1.183 (colored)

handle `cvs tag -F'; input && OK joris@.

Revision 1.183 / (download) - annotate - [select for diffs], Tue Jun 6 05:13:39 2006 UTC (17 years, 11 months ago) by joris
Branch: MAIN
Changes since 1.182: +30 -6 lines
Diff to previous 1.182 (colored)

add support for the -D option of update,
-D allows you to update a file to matching a specified date:

opencvs up -D "1 hour ago" foobar will take the first matching
revision that was commited 1 hour ago.

Revision 1.182 / (download) - annotate - [select for diffs], Sun Jun 4 13:53:27 2006 UTC (17 years, 11 months ago) by joris
Branch: MAIN
Changes since 1.181: +1 -4 lines
Diff to previous 1.181 (colored)

lets not stop looking for a branch if the first one
on the branches list does not match the one we are
looking for, it might be further down.

Revision 1.181 / (download) - annotate - [select for diffs], Sun Jun 4 09:52:56 2006 UTC (17 years, 11 months ago) by joris
Branch: MAIN
Changes since 1.180: +4 -1 lines
Diff to previous 1.180 (colored)

sprinkle -n voodoo over the add, commit and import commands.

Revision 1.180 / (download) - annotate - [select for diffs], Thu Jun 1 20:00:52 2006 UTC (17 years, 11 months ago) by joris
Branch: MAIN
Changes since 1.179: +135 -148 lines
Diff to previous 1.179 (colored)

major rewrite of some rcs parsing stuff:

- rework rcs_getrev() to correctly support branches
- rework rcs_translate_tag() to correctly translate given symbols or
  branches into their matching revisions
- rework rcs_rev_add() to correctly update its 'next' pointers
  and insert the new revision in the correct place on the list.
- rework rcs_head_get() to return the latest revision on the default
  branch if it has been set or the normal HEAD revision otherwise.
- no longer access the rf_head member of the RCSFILE struct manually,
  use the rcs_head_get() function which correctly returns the HEAD
  revision, there might be a default branch that has to be used.
- for now, when commiting a new revision reset the default branch.

Revision 1.179 / (download) - annotate - [select for diffs], Wed May 31 22:25:59 2006 UTC (17 years, 11 months ago) by joris
Branch: MAIN
Changes since 1.178: +3 -1 lines
Diff to previous 1.178 (colored)

add support for the export command.

export does exactly the same as checkout except it does
not create any administrative (CVS/) directories.

Revision 1.178 / (download) - annotate - [select for diffs], Wed May 31 18:26:14 2006 UTC (17 years, 11 months ago) by joris
Branch: MAIN
Changes since 1.177: +58 -29 lines
Diff to previous 1.177 (colored)

have rcs_translate_tag translate branches too, which
allows us to completely use branches for diffing, logging,
updating, etc..

more branches support coming up!

Revision 1.177 / (download) - annotate - [select for diffs], Tue May 30 19:16:51 2006 UTC (17 years, 11 months ago) by joris
Branch: MAIN
Changes since 1.176: +2 -1 lines
Diff to previous 1.176 (colored)

look inside the Attic if a specified RCS file cannot be found
in the normal repository, and a way to identify an RCS file in
the Attic in the RCSFILE struct.
will come in handy later on.

Revision 1.176 / (download) - annotate - [select for diffs], Mon May 29 07:15:52 2006 UTC (17 years, 11 months ago) by joris
Branch: MAIN
Changes since 1.175: +21 -1 lines
Diff to previous 1.175 (colored)

add rcs_translate_tag which will translate a specified
revision or symbol given to us on the command line into
the matching revision in the RCS file (if any);

Revision 1.175 / (download) - annotate - [select for diffs], Sun May 28 10:14:59 2006 UTC (17 years, 11 months ago) by joris
Branch: MAIN
Changes since 1.174: +2 -1 lines
Diff to previous 1.174 (colored)

add rf_dead field to RCSFILE which can tell us
if an RCSFILE is dead, will come in usefull later in commands.

Revision 1.174 / (download) - annotate - [select for diffs], Sat May 27 18:04:46 2006 UTC (17 years, 11 months ago) by joris
Branch: MAIN
Changes since 1.173: +9 -1 lines
Diff to previous 1.173 (colored)

basic support for CVSROOT/config - only supporting the 'tag' and
'umask' keyword right now.

Revision 1.173 / (download) - annotate - [select for diffs], Sat May 27 05:59:32 2006 UTC (17 years, 11 months ago) by joris
Branch: MAIN
Changes since 1.172: +3 -3 lines
Diff to previous 1.172 (colored)

correctly expand keywords when checking out files

Revision 1.172 / (download) - annotate - [select for diffs], Sat May 27 03:30:31 2006 UTC (17 years, 11 months ago) by joris
Branch: MAIN
Changes since 1.171: +188 -451 lines
Diff to previous 1.171 (colored)

commit the new opencvs code, i have been hacking on
this for the past 2 weeks now and it should go in at
the start of the hackathon so others can help out.

this code is a lot safer, smarter, faster and best of
all it is actually doing what it is suppose to do!

basic checkout, update, status, diff and commit are
working in local mode only.
there is no support for any remote setups now.

Revision 1.171 / (download) - annotate - [select for diffs], Mon May 1 18:17:39 2006 UTC (18 years ago) by niallo
Branch: MAIN
Changes since 1.170: +7 -2 lines
Diff to previous 1.170 (colored)

- fix a case in rcs_getrev() handling of branches where variant was not being
  increased and thus no progress could be made in the loop.

bug noticed in rcsdiff(1) by sturm@

ok joris@

Revision 1.170 / (download) - annotate - [select for diffs], Tue Apr 25 10:31:39 2006 UTC (18 years ago) by xsa
Branch: MAIN
Changes since 1.169: +3 -2 lines
Diff to previous 1.169 (colored)

check rcs_head_set() return value.

Revision 1.169 / (download) - annotate - [select for diffs], Fri Apr 14 02:49:43 2006 UTC (18 years, 1 month ago) by deraadt
Branch: MAIN
Changes since 1.168: +2 -2 lines
Diff to previous 1.168 (colored)

spacing

Revision 1.168 / (download) - annotate - [select for diffs], Fri Apr 14 02:45:35 2006 UTC (18 years, 1 month ago) by deraadt
Branch: MAIN
Changes since 1.167: +29 -29 lines
Diff to previous 1.167 (colored)

remove a metric buttload of excessive ()
no binary change; ok ray

Revision 1.167 / (download) - annotate - [select for diffs], Thu Apr 13 23:41:13 2006 UTC (18 years, 1 month ago) by ray
Branch: MAIN
Changes since 1.166: +9 -18 lines
Diff to previous 1.166 (colored)

Change rcs_parse_init() to return void, since it always returned 0.
Remove unused variables found by lint.

Some parts OK xsa@, ``throw it in :)'' joris@

Revision 1.166 / (download) - annotate - [select for diffs], Thu Apr 13 19:55:41 2006 UTC (18 years, 1 month ago) by joris
Branch: MAIN
Changes since 1.165: +97 -10 lines
Diff to previous 1.165 (colored)

add support for the openrcs -o'range' option.
-o allows users to delete revisions in the specified RCS files.

example:
	rcs -o1.4:1.6 foo deletes revisions 1.4 - 1.6
	rcs -o1.3 foo deletes revision 1.3

joint work with niallo@
okay niallo@

Revision 1.165 / (download) - annotate - [select for diffs], Thu Apr 13 19:16:15 2006 UTC (18 years, 1 month ago) by joris
Branch: MAIN
Changes since 1.164: +5 -5 lines
Diff to previous 1.164 (colored)

fix -z option for openrcs, this was broken by xsa
when he yanked the code out of rcs.c and placed it in rcstime.c.

	struct tm ltb, *tb;
	tb = &ltb;
	return (tb);

isn't really the most perfect idiom to return a value to the caller, now is it?

as a bonus -z for rlog now works too.
okay niallo@

Revision 1.164 / (download) - annotate - [select for diffs], Wed Apr 12 22:54:23 2006 UTC (18 years, 1 month ago) by ray
Branch: MAIN
Changes since 1.163: +1 -3 lines
Diff to previous 1.163 (colored)

Better match GNU behavior for rcs -l and rcs -u.
Save 2 bytes of newlines.

OK joris@

Revision 1.163 / (download) - annotate - [select for diffs], Mon Apr 10 12:15:21 2006 UTC (18 years, 1 month ago) by xsa
Branch: MAIN
Changes since 1.162: +15 -15 lines
Diff to previous 1.162 (colored)

rcs_kflag_usage() is not used by usr.bin/rcs; OK joris@.

Revision 1.162 / (download) - annotate - [select for diffs], Mon Apr 10 08:08:00 2006 UTC (18 years, 1 month ago) by xsa
Branch: MAIN
Changes since 1.161: +3 -6 lines
Diff to previous 1.161 (colored)

change rcs_kwexp_set() return type to void and simplify its use. OK niallo@.

Revision 1.161 / (download) - annotate - [select for diffs], Wed Apr 5 01:38:55 2006 UTC (18 years, 1 month ago) by ray
Branch: MAIN
Changes since 1.160: +21 -22 lines
Diff to previous 1.160 (colored)

Use variable names for sizeof, remove casts in front of xmalloc,
use xcalloc and xstrdup where appropriate, and other stuff.

OK joris@

Revision 1.160 / (download) - annotate - [select for diffs], Sun Apr 2 20:57:53 2006 UTC (18 years, 1 month ago) by joris
Branch: MAIN
Changes since 1.159: +3 -2 lines
Diff to previous 1.159 (colored)

some characters are in fact allowed in symbol names, don't freak
out when we encounter them, but handle them correctly.

fixes an issue i ran into when running opencvs update on my local tree;

Revision 1.159 / (download) - annotate - [select for diffs], Sat Apr 1 18:02:55 2006 UTC (18 years, 1 month ago) by joris
Branch: MAIN
Changes since 1.158: +4 -3 lines
Diff to previous 1.158 (colored)

don't use mode_t with va_arg(), use int instead and cast it later to
mode_t. doing it the other way around isn't portable as mode_t may
vary from int on some systems to short on others.

noticed by deraadt@

Revision 1.158 / (download) - annotate - [select for diffs], Thu Mar 30 23:12:52 2006 UTC (18 years, 1 month ago) by joris
Branch: MAIN
Changes since 1.157: +3 -3 lines
Diff to previous 1.157 (colored)

hmm, let's not use fatal() when we cannot find a branch instead return NULL
so the caller can identify the branch is not there and take correct action.

Revision 1.157 / (download) - annotate - [select for diffs], Thu Mar 30 23:09:01 2006 UTC (18 years, 1 month ago) by joris
Branch: MAIN
Changes since 1.156: +1 -2 lines
Diff to previous 1.156 (colored)

zap unused variable, niallo@ noticed

Revision 1.156 / (download) - annotate - [select for diffs], Thu Mar 30 23:06:25 2006 UTC (18 years, 1 month ago) by joris
Branch: MAIN
Changes since 1.155: +122 -57 lines
Diff to previous 1.155 (colored)

first part of supporting branches in openrcs. right now we can only
check them out. commit is not working yet, but will be soon.

tested by myself and ray@
okay ray@

Revision 1.155 / (download) - annotate - [select for diffs], Wed Mar 29 09:16:53 2006 UTC (18 years, 1 month ago) by ray
Branch: MAIN
Changes since 1.154: +21 -18 lines
Diff to previous 1.154 (colored)

Yet more lint:
 - Explicitly test for -1 from read(2) and write(2).
 - Change negative parameters to 0 for rcsnum_cmp().  (I think xsa@ had
   a patch for this earlier.)
 - Remove unused variables.
 - Changed return types to void if we only return one value.
 - Fix possible one-character truncation in rcs_deltatext_set().
 - Use memcpy() to copy u_char arrays.
 - Use ptrdiff_t to hold pointer differences.
 - int -> size_t for sizeof/strlen

``looks fine'' xsa@

Revision 1.154 / (download) - annotate - [select for diffs], Tue Mar 28 07:42:56 2006 UTC (18 years, 1 month ago) by ray
Branch: MAIN
Changes since 1.153: +4 -1 lines
Diff to previous 1.153 (colored)

Finally.  Basically, rcs_parse_delta() doesn't understand that
sometimes there are no revisions, and that it is not an error.  This
makes it so that if rcs_parse_delta is called and the only thing
that is found is the description, we know that there are no more
revisions.

Fixes ``rcs -i file; rlog file''.

OK xsa@

Revision 1.153 / (download) - annotate - [select for diffs], Tue Mar 28 02:13:44 2006 UTC (18 years, 1 month ago) by ray
Branch: MAIN
Changes since 1.152: +3 -3 lines
Diff to previous 1.152 (colored)

Today is Integer Overflow Prevention Day:
 - Sync xmalloc.? with ssh versions.
 - Change all xrealloc() calls to new API.

``I really like this.'' niallo@

Revision 1.152 / (download) - annotate - [select for diffs], Mon Mar 27 21:56:32 2006 UTC (18 years, 1 month ago) by niallo
Branch: MAIN
Changes since 1.151: +4 -6 lines
Diff to previous 1.151 (colored)

- properly implement GNU file modes.  basically, checkout will inherit
permissions from rcs file and initial checkin will inherit permissions from
working file.

problem spotted by uwe@

ok ray@ xsa@

Revision 1.151 / (download) - annotate - [select for diffs], Mon Mar 27 16:01:18 2006 UTC (18 years, 1 month ago) by xsa
Branch: MAIN
Changes since 1.150: +5 -20 lines
Diff to previous 1.150 (colored)

rcs_growbuf() cleanup; OK ray@.

Revision 1.150 / (download) - annotate - [select for diffs], Mon Mar 27 15:26:12 2006 UTC (18 years, 1 month ago) by xsa
Branch: MAIN
Changes since 1.149: +2 -5 lines
Diff to previous 1.149 (colored)

rcs_comment_set() will never return non-zero; change its return type to void.
OK ray@.

Revision 1.149 / (download) - annotate - [select for diffs], Mon Mar 27 07:14:13 2006 UTC (18 years, 1 month ago) by xsa
Branch: MAIN
Changes since 1.148: +2 -5 lines
Diff to previous 1.148 (colored)

rcs_desc_set() will never return non-zero; change its return type to void.
OK niallo@.

Revision 1.148 / (download) - annotate - [select for diffs], Sun Mar 26 20:02:54 2006 UTC (18 years, 1 month ago) by xsa
Branch: MAIN
Changes since 1.147: +10 -20 lines
Diff to previous 1.147 (colored)

rcs_parse_desc() cleanup; OK ray@.

Revision 1.147 / (download) - annotate - [select for diffs], Sat Mar 25 21:29:59 2006 UTC (18 years, 1 month ago) by ray
Branch: MAIN
Changes since 1.146: +14 -12 lines
Diff to previous 1.146 (colored)

Correct integer types, remove unused arguments, non-portable bitshifts
changed to division, KNF, replace unreachable code with goto fail,
et cetera.  Found by lint.

The free() -> xfree() as well.

OK niallo@

Revision 1.146 / (download) - annotate - [select for diffs], Fri Mar 24 16:18:22 2006 UTC (18 years, 1 month ago) by xsa
Branch: MAIN
Changes since 1.145: +13 -18 lines
Diff to previous 1.145 (colored)

change rcs_parse_deltas() and rcs_parse_deltatexts() return value
to void as they never return non-zero. OK ray@.

Revision 1.145 / (download) - annotate - [select for diffs], Thu Mar 23 09:03:28 2006 UTC (18 years, 2 months ago) by xsa
Branch: MAIN
Changes since 1.144: +3 -5 lines
Diff to previous 1.144 (colored)

use fatal() in rcs_lock_setmode(); OK ray@.

Revision 1.144 / (download) - annotate - [select for diffs], Wed Mar 15 05:05:35 2006 UTC (18 years, 2 months ago) by deraadt
Branch: MAIN
Changes since 1.143: +3 -3 lines
Diff to previous 1.143 (colored)

remove some bizzare idioms; ok ray

Revision 1.143 / (download) - annotate - [select for diffs], Sat Mar 11 22:44:11 2006 UTC (18 years, 2 months ago) by niallo
Branch: MAIN
Changes since 1.142: +8 -18 lines
Diff to previous 1.142 (colored)

- implement GNU-compatible handling of revisions specified as single
digits.  e.g. ci -l4 or ci -u5 will work like GNU now.

ok joris@

Revision 1.142 / (download) - annotate - [select for diffs], Sat Mar 11 18:40:14 2006 UTC (18 years, 2 months ago) by niallo
Branch: MAIN
Changes since 1.141: +2 -2 lines
Diff to previous 1.141 (colored)

- set RCS_SYNCED on rcs_open() so that if you call rcs_close() immediately
it will not write out a blank RCS file if there is no data in the backing
structure.

ok joris@

Revision 1.141 / (download) - annotate - [select for diffs], Fri Mar 10 05:57:39 2006 UTC (18 years, 2 months ago) by ray
Branch: MAIN
Changes since 1.140: +2 -3 lines
Diff to previous 1.140 (colored)

Only write a log message if the log message is not empty.
Also prevents rfp->rf_desc[-1] from happening.

ok joris, niallo, otto, and xsa

Revision 1.140 / (download) - annotate - [select for diffs], Thu Mar 9 10:56:33 2006 UTC (18 years, 2 months ago) by xsa
Branch: MAIN
Changes since 1.139: +5 -56 lines
Diff to previous 1.139 (colored)

move joris' timezone support into rcstime.c; more work to be done there.
OK joris@.

Revision 1.139 / (download) - annotate - [select for diffs], Wed Mar 8 09:03:59 2006 UTC (18 years, 2 months ago) by xsa
Branch: MAIN
Changes since 1.138: +7 -4 lines
Diff to previous 1.138 (colored)

really match gnu on error;

Revision 1.138 / (download) - annotate - [select for diffs], Wed Mar 8 05:01:50 2006 UTC (18 years, 2 months ago) by deraadt
Branch: MAIN
Changes since 1.137: +4 -4 lines
Diff to previous 1.137 (colored)

spacing

Revision 1.137 / (download) - annotate - [select for diffs], Tue Mar 7 19:17:57 2006 UTC (18 years, 2 months ago) by joris
Branch: MAIN
Changes since 1.136: +4 -4 lines
Diff to previous 1.136 (colored)

in rcs_write() only do stuff when the RCS file ondisk isn't synced;
niallo agrees;

Revision 1.136 / (download) - annotate - [select for diffs], Tue Mar 7 16:48:53 2006 UTC (18 years, 2 months ago) by joris
Branch: MAIN
Changes since 1.135: +9 -1 lines
Diff to previous 1.135 (colored)

make sure the timezone is valid;

Revision 1.135 / (download) - annotate - [select for diffs], Tue Mar 7 01:43:18 2006 UTC (18 years, 2 months ago) by joris
Branch: MAIN
Changes since 1.134: +3 -3 lines
Diff to previous 1.134 (colored)

match gnu on error;

Revision 1.134 / (download) - annotate - [select for diffs], Tue Mar 7 01:40:52 2006 UTC (18 years, 2 months ago) by joris
Branch: MAIN
Changes since 1.133: +58 -6 lines
Diff to previous 1.133 (colored)

-z support for RCS;

Revision 1.133 / (download) - annotate - [select for diffs], Sun Mar 5 16:22:31 2006 UTC (18 years, 2 months ago) by niallo
Branch: MAIN
Changes since 1.132: +9 -3 lines
Diff to previous 1.132 (colored)

in rcs_patch_lines(), ensure that rcs patch delete operations don't
leave the dlp pointing at a non-existant line, but instead point it to
the last one in our TAILQ.

this fixes an annoying bug in rcs_patch_lines() where dlp would be
sometimes set to NULL when really it shouldn't be, resulting in an
"invalid line specification in RCS patch" error.

ok xsa@ joris@

Revision 1.132 / (download) - annotate - [select for diffs], Sun Mar 5 16:06:59 2006 UTC (18 years, 2 months ago) by niallo
Branch: MAIN
Changes since 1.131: +11 -24 lines
Diff to previous 1.131 (colored)

fatal() instead of returning -1 on failure in patch functions
ed_patch_lines() and rcs_patch_lines().  this can avoid segfault in certain
circumstances.

From: Ray Lai <ray@cyth.net>

discussed with xsa@ and joris@

Revision 1.131 / (download) - annotate - [select for diffs], Sun Mar 5 14:18:56 2006 UTC (18 years, 2 months ago) by niallo
Branch: MAIN
Changes since 1.130: +41 -25 lines
Diff to previous 1.130 (colored)

our deltatexts were sometimes different from gnu.  rcs_getrev() was
unconditionally doing keyword expansion, even when this wasn't what we
wanted e.g. in checkout_rev() and cvs_checkout_rev(). so:

- change semantics of rcs_getrev() to not do keyword expansion
- add an rcs.c api function rcs_kwexp_buf() which does this
- change both checkout_rev() and cvs_checkout_rev() to use this function.

eyeballed by xsa, joris and Ray Lai

Revision 1.130 / (download) - annotate - [select for diffs], Sun Feb 26 16:06:46 2006 UTC (18 years, 2 months ago) by niallo
Branch: MAIN
CVS Tags: OPENBSD_3_9_BASE, OPENBSD_3_9
Changes since 1.129: +2 -1 lines
Diff to previous 1.129 (colored)

also set 'entry' variable in merged case.

fixes PR#5037

From Ray Lai <ray at cyth.net>

"somebody please commit" joris@

Revision 1.129 / (download) - annotate - [select for diffs], Mon Feb 13 11:02:58 2006 UTC (18 years, 3 months ago) by xsa
Branch: MAIN
Changes since 1.128: +4 -3 lines
Diff to previous 1.128 (colored)

write out an empty comment in RCS files even if there isn't one as
gnu/usr.bin/cvs does. Found by niallo@'s automatic tool.

Revision 1.128 / (download) - annotate - [select for diffs], Thu Feb 9 08:08:56 2006 UTC (18 years, 3 months ago) by niallo
Branch: MAIN
Changes since 1.127: +14 -37 lines
Diff to previous 1.127 (colored)

- move rcs_kw-related data into rcs.h and de-static the keyword array. this
  allows access from outside rcs.c and will be needed for upcoming features
  in ci(1).

ok joris@ xsa@

Revision 1.127 / (download) - annotate - [select for diffs], Wed Feb 1 13:52:51 2006 UTC (18 years, 3 months ago) by xsa
Branch: MAIN
Changes since 1.126: +2 -1 lines
Diff to previous 1.126 (colored)

set rcs_errno accordingly in rcs_open() if the file is not found.
OK niallo@.

Revision 1.126 / (download) - annotate - [select for diffs], Thu Jan 26 09:05:31 2006 UTC (18 years, 3 months ago) by xsa
Branch: MAIN
Changes since 1.125: +4 -2 lines
Diff to previous 1.125 (colored)

strings cleanup; OK niallo@.

Revision 1.125 / (download) - annotate - [select for diffs], Tue Jan 10 15:00:47 2006 UTC (18 years, 4 months ago) by niallo
Branch: MAIN
Changes since 1.124: +47 -38 lines
Diff to previous 1.124 (colored)

- rewrite RCS keyword expansion. the old way of doing it was very slow,
this method avoids lots of expensive buffer operations, and gives OpenCVS a
considerable speed boost.

ok xsa@ "put it in" joris@

Revision 1.124 / (download) - annotate - [select for diffs], Tue Jan 3 11:06:55 2006 UTC (18 years, 4 months ago) by xsa
Branch: MAIN
Changes since 1.123: +4 -4 lines
Diff to previous 1.123 (colored)

knf;

Revision 1.123 / (download) - annotate - [select for diffs], Mon Jan 2 08:11:56 2006 UTC (18 years, 4 months ago) by xsa
Branch: MAIN
Changes since 1.122: +2 -14 lines
Diff to previous 1.122 (colored)

#include's cleanup; ok joris@ niallo@.

Revision 1.122 / (download) - annotate - [select for diffs], Fri Dec 30 17:51:01 2005 UTC (18 years, 4 months ago) by reyk
Branch: MAIN
Changes since 1.121: +5 -5 lines
Diff to previous 1.121 (colored)

knf

Revision 1.121 / (download) - annotate - [select for diffs], Fri Dec 30 16:53:55 2005 UTC (18 years, 4 months ago) by niallo
Branch: MAIN
Changes since 1.120: +1 -7 lines
Diff to previous 1.120 (colored)

- zap unused 'rf_ref' member of RCSFILE structure.

spotted by joris@

Revision 1.120 / (download) - annotate - [select for diffs], Fri Dec 30 16:48:33 2005 UTC (18 years, 4 months ago) by niallo
Branch: MAIN
Changes since 1.119: +3 -3 lines
Diff to previous 1.119 (colored)

- simplify an unecessary if/else construct in rcs_open()

spotted by joris@

Revision 1.119 / (download) - annotate - [select for diffs], Fri Dec 30 16:45:35 2005 UTC (18 years, 4 months ago) by niallo
Branch: MAIN
Changes since 1.118: +2 -2 lines
Diff to previous 1.118 (colored)

- realloc() -> xrealloc(), was missed in the original sweep.

Revision 1.118 / (download) - annotate - [select for diffs], Wed Dec 28 18:27:24 2005 UTC (18 years, 4 months ago) by joris
Branch: MAIN
Changes since 1.117: +3 -2 lines
Diff to previous 1.117 (colored)

don't use rf_pdata when it's not allocated.

Revision 1.117 / (download) - annotate - [select for diffs], Tue Dec 27 16:05:20 2005 UTC (18 years, 4 months ago) by niallo
Branch: MAIN
Changes since 1.116: +153 -56 lines
Diff to previous 1.116 (colored)

- implement lazy-parsing of rcs files, that is only parse as much as we
  need. this can save us much work, particularly with very large rcs files.

first of a few important performance improvements.

ok joris@

Revision 1.116 / (download) - annotate - [select for diffs], Sat Dec 24 04:10:51 2005 UTC (18 years, 4 months ago) by joris
Branch: MAIN
Changes since 1.115: +3 -5 lines
Diff to previous 1.115 (colored)

remove useless cvs_buf_alloc() failure checks;

Revision 1.115 / (download) - annotate - [select for diffs], Thu Dec 22 02:26:33 2005 UTC (18 years, 5 months ago) by niallo
Branch: MAIN
Changes since 1.114: +6 -1 lines
Diff to previous 1.114 (colored)

- fix handling of zero byte files.

with this diff, open cvs can do a full local checkout of the XF4 tree on
64-bit architectures, which gnu cvs cannot due to some bug.

ok joris@

Revision 1.114 / (download) - annotate - [select for diffs], Tue Dec 20 18:17:01 2005 UTC (18 years, 5 months ago) by xsa
Branch: MAIN
Changes since 1.113: +6 -17 lines
Diff to previous 1.113 (colored)

cvs_buf_putc() and cvs_buf_write_*() functions cannot fail anymore;

Revision 1.113 / (download) - annotate - [select for diffs], Tue Dec 20 16:55:21 2005 UTC (18 years, 5 months ago) by xsa
Branch: MAIN
Changes since 1.112: +12 -21 lines
Diff to previous 1.112 (colored)

use fatal(); OK joris@ niallo@.

Revision 1.112 / (download) - annotate - [select for diffs], Mon Dec 19 17:43:01 2005 UTC (18 years, 5 months ago) by xsa
Branch: MAIN
Changes since 1.111: +3 -6 lines
Diff to previous 1.111 (colored)

use fatal() if getpwuid() fails; OK joris@.

Revision 1.111 / (download) - annotate - [select for diffs], Mon Dec 12 17:47:03 2005 UTC (18 years, 5 months ago) by joris
Branch: MAIN
Changes since 1.110: +21 -82 lines
Diff to previous 1.110 (colored)

rcsnum_alloc() and rcsnum_cpy() no longer can fail, so don't
bother checking return values for failure.

ok xsa@

Revision 1.110 / (download) - annotate - [select for diffs], Sat Dec 10 20:27:45 2005 UTC (18 years, 5 months ago) by joris
Branch: MAIN
Changes since 1.109: +97 -257 lines
Diff to previous 1.109 (colored)

switch to xmalloc stuff, me and xsa@ agreed on this a long
time ago, but we were being held back by jfb. too bad for him.

next step is to use fatal() through out the code for unrecoverable
errors instead of trying to be all nice and fluffy and reach main() again.

ok niallo@ and xsa@

Revision 1.109 / (download) - annotate - [select for diffs], Thu Dec 8 18:56:10 2005 UTC (18 years, 5 months ago) by joris
Branch: MAIN
Changes since 1.108: +26 -5 lines
Diff to previous 1.108 (colored)

complete and correct rcs locking functionality,
it was only done partially and as a bonus, completely wrong.

seriously guys what was up with that?

Revision 1.108 / (download) - annotate - [select for diffs], Sat Dec 3 15:31:53 2005 UTC (18 years, 5 months ago) by joris
Branch: MAIN
Changes since 1.107: +9 -3 lines
Diff to previous 1.107 (colored)

todd@ reminds me:

If you 'vi file.c' and change stuff, then 'make depend && make' you'll
have a file.o file most definately more recent than the latest committed
version of file.c.

Then, if you rm file.c, and cvs update file.c, if 'file.c' is set to the
timestamp of the last committed version, a subsequent 'make' will not
rebuild the .o file.

to fix this we simply use the current timestamp when updating files.
thanks todd@!

Revision 1.107 / (download) - annotate - [select for diffs], Sat Dec 3 15:07:21 2005 UTC (18 years, 5 months ago) by joris
Branch: MAIN
Changes since 1.106: +10 -1 lines
Diff to previous 1.106 (colored)

fix date handling in opencvs, this was broken since the very start.
now, when you checkout a tree with gnu cvs, opencvs no longer sees all
the files as modified, and visa versa.

this actually makes gnu cvs and opencvs dance together in working copies.

Revision 1.106 / (download) - annotate - [select for diffs], Sat Dec 3 02:10:58 2005 UTC (18 years, 5 months ago) by joris
Branch: MAIN
Changes since 1.105: +5 -1 lines
Diff to previous 1.105 (colored)

usr.bin/rcs stuff doesn't care about cvs_checkout_rev();

Revision 1.105 / (download) - annotate - [select for diffs], Sat Dec 3 01:02:09 2005 UTC (18 years, 5 months ago) by joris
Branch: MAIN
Changes since 1.104: +223 -2 lines
Diff to previous 1.104 (colored)

add very basic support for the following stuff:

- checkout in local mode (example: /cvs)
- update in local and server mode (example: /cvs and user@host:/cvs)
- import in local and server mode (example: /cvs and user@host:/cvs)

what remains to be done:

- not all options are supported yet, and update cannot pick up newly
  added files yet. these things are pending and will be commited
  real soon.

- checkout only works locally right now.

- fix rcs parsing code so that we don't fucking hog 100% cpu
  on really BIG BIG BIG ass trees.

mainly tested by pedro@ and myself, thanks a lot pedro!

"go for it" niallo@

Revision 1.104 / (download) - annotate - [select for diffs], Fri Dec 2 21:21:47 2005 UTC (18 years, 5 months ago) by joris
Branch: MAIN
Changes since 1.103: +1 -2 lines
Diff to previous 1.103 (colored)

remove debug message;

Revision 1.103 / (download) - annotate - [select for diffs], Fri Dec 2 20:08:41 2005 UTC (18 years, 5 months ago) by joris
Branch: MAIN
Changes since 1.102: +15 -7 lines
Diff to previous 1.102 (colored)

fix commiting/importing of 0 sized files.
found and tested by pedro@ and niallo@

ok niallo@

Revision 1.102 / (download) - annotate - [select for diffs], Thu Dec 1 18:22:09 2005 UTC (18 years, 5 months ago) by xsa
Branch: MAIN
Changes since 1.101: +2 -3 lines
Diff to previous 1.101 (colored)

rcs_findrev() is not static anymore; align protos while here;
OK joris@ niallo@.

Revision 1.101 / (download) - annotate - [select for diffs], Tue Nov 22 11:49:02 2005 UTC (18 years, 6 months ago) by niallo
Branch: MAIN
Changes since 1.100: +16 -4 lines
Diff to previous 1.100 (colored)

- ci(1) can intialise RCS files now!
- support for -j added
- support for -i added

ok joris@ xsa@

Revision 1.100 / (download) - annotate - [select for diffs], Wed Nov 16 08:15:21 2005 UTC (18 years, 6 months ago) by xsa
Branch: MAIN
Changes since 1.99: +22 -10 lines
Diff to previous 1.99 (colored)

fix writing of RCS files; it has been bugging us for a while now...
now, former RCS suite can make a use of our newly written RCS files;
ok joris niallo

Revision 1.99 / (download) - annotate - [select for diffs], Sat Nov 12 21:34:48 2005 UTC (18 years, 6 months ago) by niallo
Branch: MAIN
Changes since 1.98: +51 -52 lines
Diff to previous 1.98 (colored)

- remove strtab stuff. serves no useful purpose.

diff is from joris@, committing on his behalf because his net connection
is very dodgy right now.

Revision 1.98 / (download) - annotate - [select for diffs], Wed Nov 9 15:42:58 2005 UTC (18 years, 6 months ago) by xsa
Branch: MAIN
Changes since 1.97: +2 -2 lines
Diff to previous 1.97 (colored)

add missing '\n' when writing deltatexts in an RCS file;

Revision 1.97 / (download) - annotate - [select for diffs], Wed Nov 2 20:32:44 2005 UTC (18 years, 6 months ago) by niallo
Branch: MAIN
Changes since 1.96: +36 -1 lines
Diff to previous 1.96 (colored)

changes from Venice:

- instead of using lots of individual flag variables, use a single int and
  bitwise operations on it. while this saves memory, really it saves code
  space and reduces complexity. checkout_rev() and checkout_state() in
  particular benefit from these changes since their parameters where growing
  really long.

- implement `-s' option in co

- implement `-M' option in ci

"I like this, go for it" joris@

Revision 1.96 / (download) - annotate - [select for diffs], Sun Oct 30 11:10:12 2005 UTC (18 years, 6 months ago) by xsa
Branch: MAIN
Changes since 1.95: +4 -4 lines
Diff to previous 1.95 (colored)

nuke trailing whitespaces;

Revision 1.95 / (download) - annotate - [select for diffs], Sat Oct 29 19:05:50 2005 UTC (18 years, 6 months ago) by niallo
Branch: MAIN
Changes since 1.94: +44 -1 lines
Diff to previous 1.94 (colored)

- add two new functions to RCS api: rcs_state_set() and rcs_state_check()
- use these two new functions to implement -s<state> option in ci

ok joris@

Revision 1.94 / (download) - annotate - [select for diffs], Sat Oct 22 17:32:57 2005 UTC (18 years, 7 months ago) by joris
Branch: MAIN
Changes since 1.93: +37 -183 lines
Diff to previous 1.93 (colored)

diff3 support, needed for merging files together;

"go for it" niallo@

Revision 1.93 / (download) - annotate - [select for diffs], Sat Oct 22 17:23:21 2005 UTC (18 years, 7 months ago) by joris
Branch: MAIN
Changes since 1.92: +8 -6 lines
Diff to previous 1.92 (colored)

- don't check for admin files when running init;
- don't pass the Entry for newly added files to cvs_date_parse()
- in rcs_rev_add don't bother looking for the previous rev if we
  are creating the RCS file.

from PR 4575

Revision 1.92 / (download) - annotate - [select for diffs], Tue Oct 18 01:08:13 2005 UTC (18 years, 7 months ago) by joris
Branch: MAIN
Changes since 1.91: +10 -1 lines
Diff to previous 1.91 (colored)

plug memleaks in rcs_rev_add() when an error occurs;

Revision 1.91 / (download) - annotate - [select for diffs], Sun Oct 16 17:44:15 2005 UTC (18 years, 7 months ago) by joris
Branch: MAIN
Changes since 1.90: +1 -3 lines
Diff to previous 1.90 (colored)

fix the locks section in RCS files;

Revision 1.90 / (download) - annotate - [select for diffs], Sat Oct 15 22:56:03 2005 UTC (18 years, 7 months ago) by niallo
Branch: MAIN
Changes since 1.89: +9 -3 lines
Diff to previous 1.89 (colored)

- add username parameter to rcs_rev_add(), needed to implement at least
  `ci -wusername'.

ok joris@

Revision 1.89 / (download) - annotate - [select for diffs], Tue Oct 11 00:10:16 2005 UTC (18 years, 7 months ago) by joris
Branch: MAIN
Changes since 1.88: +1 -2 lines
Diff to previous 1.88 (colored)

more debug stuff i forgot to take out, i blame the dominican sun!

Revision 1.88 / (download) - annotate - [select for diffs], Tue Oct 11 00:08:34 2005 UTC (18 years, 7 months ago) by joris
Branch: MAIN
Changes since 1.87: +1 -5 lines
Diff to previous 1.87 (colored)

remove debug cruft;

Revision 1.87 / (download) - annotate - [select for diffs], Tue Oct 11 00:07:29 2005 UTC (18 years, 7 months ago) by joris
Branch: MAIN
Changes since 1.86: +7 -3 lines
Diff to previous 1.86 (colored)

fix patching in rcs_getrev();

Revision 1.86 / (download) - annotate - [select for diffs], Mon Oct 10 23:37:15 2005 UTC (18 years, 7 months ago) by joris
Branch: MAIN
Changes since 1.85: +28 -1 lines
Diff to previous 1.85 (colored)

add rcs_rev_setlog() in the RCS api; used for setting log messages
of a revision to a specific value;

ok niallo@

Revision 1.85 / (download) - annotate - [select for diffs], Mon Oct 10 14:42:54 2005 UTC (18 years, 7 months ago) by joris
Branch: MAIN
Changes since 1.84: +3 -5 lines
Diff to previous 1.84 (colored)

better symbol listing in RCS files;

Revision 1.84 / (download) - annotate - [select for diffs], Mon Oct 10 14:16:03 2005 UTC (18 years, 7 months ago) by joris
Branch: MAIN
Changes since 1.83: +3 -11 lines
Diff to previous 1.83 (colored)

use rd_next in rcs_getrev() when patching to get to a revision
instead of just decrementing the revision number, as the previous revision
doesn't always follow the current revision - 1 rule.

ok niallo@

Revision 1.83 / (download) - annotate - [select for diffs], Mon Oct 10 13:41:25 2005 UTC (18 years, 7 months ago) by joris
Branch: MAIN
Changes since 1.82: +26 -5 lines
Diff to previous 1.82 (colored)

correctly fill in the rd_next field in rcs_rev_add();
ok niallo@

Revision 1.82 / (download) - annotate - [select for diffs], Sun Oct 9 16:14:23 2005 UTC (18 years, 7 months ago) by joris
Branch: MAIN
Changes since 1.81: +3 -3 lines
Diff to previous 1.81 (colored)

fix 2 off-by-one's which was causing us a whole load of crap;
ok niallo@

Revision 1.81 / (download) - annotate - [select for diffs], Fri Oct 7 23:59:56 2005 UTC (18 years, 7 months ago) by niallo
Branch: MAIN
Changes since 1.80: +32 -19 lines
Diff to previous 1.80 (colored)

basic `ci' support is here! more coming soon.

combined effort with joris.

ok joris@

Revision 1.80 / (download) - annotate - [select for diffs], Fri Oct 7 21:47:32 2005 UTC (18 years, 7 months ago) by reyk
Branch: MAIN
Changes since 1.79: +13 -8 lines
Diff to previous 1.79 (colored)

knf and spacing, ok joris@

Revision 1.79 / (download) - annotate - [select for diffs], Wed Oct 5 23:11:07 2005 UTC (18 years, 7 months ago) by niallo
Branch: MAIN
Changes since 1.78: +2 -1 lines
Diff to previous 1.78 (colored)

- add a diff.h header file, corresponding to public functions in diff.c
  and some #defines
- include this header in rcs.c
- link rcs against diff.c

this allows us to use the existing diff work from opencvs within functions
in the rcs.c API and thus in rcs programs. paves the way for diff support
in usr.bin/rcs programs.

ok joris@

Revision 1.78 / (download) - annotate - [select for diffs], Wed Oct 5 17:34:59 2005 UTC (18 years, 7 months ago) by joris
Branch: MAIN
Changes since 1.77: +2 -2 lines
Diff to previous 1.77 (colored)

open the RCS file with O_TRUNC as well when
writing new contents to it;

Revision 1.77 / (download) - annotate - [select for diffs], Wed Oct 5 11:38:02 2005 UTC (18 years, 7 months ago) by joris
Branch: MAIN
Changes since 1.76: +2 -1 lines
Diff to previous 1.76 (colored)

free rl_name as well when freeing the lock list;

Revision 1.76 / (download) - annotate - [select for diffs], Tue Oct 4 23:02:56 2005 UTC (18 years, 7 months ago) by joris
Branch: MAIN
Changes since 1.75: +12 -1 lines
Diff to previous 1.75 (colored)

correctly parse the lock section in an RCS file;

Revision 1.75 / (download) - annotate - [select for diffs], Tue Oct 4 14:55:36 2005 UTC (18 years, 7 months ago) by joris
Branch: MAIN
Changes since 1.74: +12 -2 lines
Diff to previous 1.74 (colored)

write locks to the RCS file;

Revision 1.74 / (download) - annotate - [select for diffs], Sun Oct 2 21:44:18 2005 UTC (18 years, 7 months ago) by joris
Branch: MAIN
Changes since 1.73: +3 -3 lines
Diff to previous 1.73 (colored)

correctly copy and NUL-terminate deltatext strings so we don't end up
using garbage in rcs_patch_lines().

Revision 1.73 / (download) - annotate - [select for diffs], Fri Sep 30 15:06:46 2005 UTC (18 years, 7 months ago) by joris
Branch: MAIN
Changes since 1.72: +14 -7 lines
Diff to previous 1.72 (colored)

spacing & KNF

Revision 1.72 / (download) - annotate - [select for diffs], Fri Sep 30 14:50:32 2005 UTC (18 years, 7 months ago) by niallo
Branch: MAIN
Changes since 1.71: +82 -6 lines
Diff to previous 1.71 (colored)

rework the rcs_write() function.

now it writes to a temporary file, then rename()s this into place or copies it
if rename() is not possible.

allows us to work with read-only ,v files.

"put your diff in" joris@

Revision 1.71 / (download) - annotate - [select for diffs], Thu Sep 29 20:54:29 2005 UTC (18 years, 7 months ago) by moritz
Branch: MAIN
Changes since 1.70: +9 -1 lines
Diff to previous 1.70 (colored)

free the access list when rcs file is closed. ok joris@

Revision 1.70 / (download) - annotate - [select for diffs], Thu Sep 29 20:51:35 2005 UTC (18 years, 7 months ago) by moritz
Branch: MAIN
Changes since 1.69: +4 -1 lines
Diff to previous 1.69 (colored)

set RCS_SYNCED to off in some more functions which
change rcs file content. ok joris@

Revision 1.69 / (download) - annotate - [select for diffs], Thu Sep 29 20:47:34 2005 UTC (18 years, 7 months ago) by moritz
Branch: MAIN
Changes since 1.68: +3 -3 lines
Diff to previous 1.68 (colored)

return -1 instead of NULL in rcs_sym_{add,remove}. ok joris@

Revision 1.68 / (download) - annotate - [select for diffs], Thu Sep 29 20:44:58 2005 UTC (18 years, 7 months ago) by moritz
Branch: MAIN
Changes since 1.67: +8 -1 lines
Diff to previous 1.67 (colored)

don't forget to put the revision into the rcs_lock
struct in rcs_lock_add(). ok niallo@ joris@

Revision 1.67 / (download) - annotate - [select for diffs], Thu Sep 29 15:39:41 2005 UTC (18 years, 7 months ago) by niallo
Branch: MAIN
Changes since 1.66: +18 -1 lines
Diff to previous 1.66 (colored)

implement RCS_HEAD_REV in rcs_rev_add()

ok joris@

Revision 1.66 / (download) - annotate - [select for diffs], Thu Sep 29 15:29:20 2005 UTC (18 years, 7 months ago) by joris
Branch: MAIN
Changes since 1.65: +8 -3 lines
Diff to previous 1.65 (colored)

allow RCS_HEAD_REV to be passed to rcs_getrev() to obtain the head revision;

Revision 1.65 / (download) - annotate - [select for diffs], Mon Sep 19 15:47:14 2005 UTC (18 years, 8 months ago) by niallo
Branch: MAIN
Changes since 1.64: +4 -2 lines
Diff to previous 1.64 (colored)

Zap some compiler warnings about uninitialized variables.

ok joris@

Revision 1.64 / (download) - annotate - [select for diffs], Sun Sep 18 15:27:38 2005 UTC (18 years, 8 months ago) by niallo
Branch: MAIN
Changes since 1.63: +5 -1 lines
Diff to previous 1.63 (colored)

- ensure rcs_rev_add() and rcs_kwexp_set() set the RCS_SYNCED flag to off
  properly.

ok joris@

Revision 1.63 / (download) - annotate - [select for diffs], Sun Sep 18 06:19:10 2005 UTC (18 years, 8 months ago) by joris
Branch: MAIN
Changes since 1.62: +224 -17 lines
Diff to previous 1.62 (colored)

RCS keyword expansion support, only $Log$ is not supported right now.

Revision 1.62 / (download) - annotate - [select for diffs], Sun Sep 18 00:33:40 2005 UTC (18 years, 8 months ago) by joris
Branch: MAIN
Changes since 1.61: +2 -1 lines
Diff to previous 1.61 (colored)

fix memleak

Revision 1.61 / (download) - annotate - [select for diffs], Sat Sep 17 23:47:17 2005 UTC (18 years, 8 months ago) by joris
Branch: MAIN
Changes since 1.60: +4 -4 lines
Diff to previous 1.60 (colored)

fix stupidity in rcs_patch_lines() and return -1 on error so we actually
catch the error instead of completely crashing.

Revision 1.60 / (download) - annotate - [select for diffs], Mon Sep 5 19:25:00 2005 UTC (18 years, 8 months ago) by xsa
Branch: MAIN
Changes since 1.59: +6 -6 lines
Diff to previous 1.59 (colored)

style;

Revision 1.59 / (download) - annotate - [select for diffs], Sun Aug 14 19:49:18 2005 UTC (18 years, 9 months ago) by xsa
Branch: MAIN
CVS Tags: OPENBSD_3_8_BASE, OPENBSD_3_8
Changes since 1.58: +2 -2 lines
Diff to previous 1.58 (colored)

missing casts; ok joris

Revision 1.58 / (download) - annotate - [select for diffs], Thu Aug 11 14:10:20 2005 UTC (18 years, 9 months ago) by xsa
Branch: MAIN
Changes since 1.57: +9 -5 lines
Diff to previous 1.57 (colored)

a few casts; ok jfb

Revision 1.57 / (download) - annotate - [select for diffs], Mon Jul 25 12:05:43 2005 UTC (18 years, 9 months ago) by xsa
Branch: MAIN
Changes since 1.56: +83 -83 lines
Diff to previous 1.56 (colored)

KNF;

Revision 1.56 / (download) - annotate - [select for diffs], Thu Jul 7 14:27:57 2005 UTC (18 years, 10 months ago) by joris
Branch: MAIN
Changes since 1.55: +2 -2 lines
Diff to previous 1.55 (colored)



remove trailing whitespaces

from deraadt@

Revision 1.55 / (download) - annotate - [select for diffs], Tue May 31 08:58:48 2005 UTC (18 years, 11 months ago) by xsa
Branch: MAIN
Changes since 1.54: +6 -7 lines
Diff to previous 1.54 (colored)

headers ordering (alphabetically) and cleanup, from mbalmer@ and myself;

Revision 1.54 / (download) - annotate - [select for diffs], Wed May 25 21:59:16 2005 UTC (18 years, 11 months ago) by jfb
Branch: MAIN
Changes since 1.53: +1 -23 lines
Diff to previous 1.53 (colored)

unused code

Revision 1.53 / (download) - annotate - [select for diffs], Wed May 25 21:32:31 2005 UTC (18 years, 11 months ago) by jfb
Branch: MAIN
Changes since 1.52: +12 -4 lines
Diff to previous 1.52 (colored)

modify rcs_rev_add() to accept a time_t argument to explicitly set
the revision's timestamp (-1 is equivalent to using the current time)

Revision 1.52 / (download) - annotate - [select for diffs], Wed May 25 08:00:03 2005 UTC (18 years, 11 months ago) by jfb
Branch: MAIN
Changes since 1.51: +108 -6 lines
Diff to previous 1.51 (colored)

- basic code for rcs_rev_add() and rcs_rev_remove(), does not
  handle deltatexts yet
- fix rcs_head_set() by allocating the head pointer if there was no
  previous head revision
- initialize subnodes list correctly for RCS deltas
- fix a crash in rcs_strprint() on NULL strings
-

Revision 1.51 / (download) - annotate - [select for diffs], Wed May 25 07:15:16 2005 UTC (18 years, 11 months ago) by jfb
Branch: MAIN
Changes since 1.50: +97 -1 lines
Diff to previous 1.50 (colored)

add cvs_comment_lookup() and a suffix -> comment leader lookup table
to determine the appropriate comment leader for a file

Revision 1.50 / (download) - annotate - [select for diffs], Wed May 25 06:42:41 2005 UTC (18 years, 11 months ago) by jfb
Branch: MAIN
Changes since 1.49: +57 -12 lines
Diff to previous 1.49 (colored)

add the RCS_ERR_ERRNO code to indicate that the actual error code is
in errno, fix cvs_errstr() to return the appropriate string, and
sprinkle some error setting where appropriate

Revision 1.49 / (download) - annotate - [select for diffs], Wed Apr 20 23:11:30 2005 UTC (19 years, 1 month ago) by jfb
Branch: MAIN
Changes since 1.48: +2 -2 lines
Diff to previous 1.48 (colored)

check the validity of tag names passed to the tag command, and print
an abort message if the tag is invalid.  also, match gnu cvs behaviour
with regards to command usage output on usage errors.

ok joris

Revision 1.48 / (download) - annotate - [select for diffs], Tue Apr 19 19:30:18 2005 UTC (19 years, 1 month ago) by jfb
Branch: MAIN
Changes since 1.47: +3 -1 lines
Diff to previous 1.47 (colored)

add error messages for the new RCS error codes

Revision 1.47 / (download) - annotate - [select for diffs], Tue Apr 19 19:22:31 2005 UTC (19 years, 1 month ago) by jfb
Branch: MAIN
Changes since 1.46: +46 -1 lines
Diff to previous 1.46 (colored)

add rcs_sym_check() to check the validity of an RCS symbol and
sprinkle some in the other symbol functions

Revision 1.46 / (download) - annotate - [select for diffs], Tue Apr 12 14:40:19 2005 UTC (19 years, 1 month ago) by jfb
Branch: MAIN
Changes since 1.45: +14 -7 lines
Diff to previous 1.45 (colored)

* handle errors when loading delta branches
* when writing RCS output, generate the proper list of branches for
  deltas

Revision 1.45 / (download) - annotate - [select for diffs], Mon Apr 11 20:32:56 2005 UTC (19 years, 1 month ago) by jfb
Branch: MAIN
Changes since 1.44: +6 -5 lines
Diff to previous 1.44 (colored)

modify handling of RCS delta texts so we can handle arbitrary binary
data

Revision 1.44 / (download) - annotate - [select for diffs], Mon Apr 11 19:36:46 2005 UTC (19 years, 1 month ago) by jfb
Branch: MAIN
Changes since 1.43: +2 -2 lines
Diff to previous 1.43 (colored)

fix year value in RCS output

Revision 1.43 / (download) - annotate - [select for diffs], Thu Apr 7 22:08:57 2005 UTC (19 years, 1 month ago) by jfb
Branch: MAIN
Changes since 1.42: +36 -4 lines
Diff to previous 1.42 (colored)

* reverse symbol list order
* allow retrieval and setting of the head revision number

Revision 1.42 / (download) - annotate - [select for diffs], Thu Apr 7 20:50:22 2005 UTC (19 years, 1 month ago) by jfb
Branch: MAIN
Changes since 1.41: +58 -67 lines
Diff to previous 1.41 (colored)

Perform proper escaping of the @ character in all RCS strings when
writing the output to the file.

ok joris@

Revision 1.41 / (download) - annotate - [select for diffs], Thu Apr 7 16:47:11 2005 UTC (19 years, 1 month ago) by jfb
Branch: MAIN
Changes since 1.40: +8 -8 lines
Diff to previous 1.40 (colored)

Fix RCS parsing for keywords that expect and ID and use cvs_strfree()
instead of free() on the duplicated token string to fix a double-free

ok xsa@

Revision 1.40 / (download) - annotate - [select for diffs], Wed Apr 6 19:12:08 2005 UTC (19 years, 1 month ago) by jfb
Branch: MAIN
Changes since 1.39: +92 -1 lines
Diff to previous 1.39 (colored)

* allow for creation and removal of RCS locks
* add rcs_tag_resolve() to resolve a branch, tag or revision easily

Revision 1.39 / (download) - annotate - [select for diffs], Wed Apr 6 18:51:29 2005 UTC (19 years, 1 month ago) by joris
Branch: MAIN
Changes since 1.38: +33 -32 lines
Diff to previous 1.38 (colored)



start using strtab stuff in RCS code.

ok jfb@, xsa@

Revision 1.38 / (download) - annotate - [select for diffs], Wed Apr 6 17:09:05 2005 UTC (19 years, 1 month ago) by joris
Branch: MAIN
Changes since 1.37: +5 -2 lines
Diff to previous 1.37 (colored)



plug memleak in rcs_splitlines()

ok jfb@

Revision 1.37 / (download) - annotate - [select for diffs], Sat Mar 26 08:09:54 2005 UTC (19 years, 1 month ago) by tedu
Branch: MAIN
Changes since 1.36: +11 -2 lines
Diff to previous 1.36 (colored)

fix a variety of things i found at coverity.  ok joris@

Revision 1.36 / (download) - annotate - [select for diffs], Sun Mar 13 22:50:34 2005 UTC (19 years, 2 months ago) by jfb
Branch: MAIN
CVS Tags: OPENBSD_3_7_BASE, OPENBSD_3_7
Changes since 1.35: +4 -5 lines
Diff to previous 1.35 (colored)

set rcs_errno to RCS_ERR_NOENT if no matching symbol is found in
rcs_sym_getrev()

Revision 1.35 / (download) - annotate - [select for diffs], Sun Mar 13 22:07:49 2005 UTC (19 years, 2 months ago) by jfb
Branch: MAIN
Changes since 1.34: +50 -9 lines
Diff to previous 1.34 (colored)

support for the optional `branch' keyword, which is used to set the
default branch for an RCS file

Revision 1.34 / (download) - annotate - [select for diffs], Sun Mar 13 21:47:04 2005 UTC (19 years, 2 months ago) by jfb
Branch: MAIN
Changes since 1.33: +1 -34 lines
Diff to previous 1.33 (colored)

spacing

Revision 1.33 / (download) - annotate - [select for diffs], Sat Mar 5 18:25:30 2005 UTC (19 years, 2 months ago) by jfb
Branch: MAIN
Changes since 1.32: +55 -1 lines
Diff to previous 1.32 (colored)

add functions to retrieve and set the comment leader for an RCS
file

Revision 1.32 / (download) - annotate - [select for diffs], Sat Mar 5 05:58:39 2005 UTC (19 years, 2 months ago) by jfb
Branch: MAIN
Changes since 1.31: +30 -7 lines
Diff to previous 1.31 (colored)

add RCS error codes and a global variable to hold the last error
and make the code less verbose at the same time

Revision 1.31 / (download) - annotate - [select for diffs], Sat Mar 5 05:02:15 2005 UTC (19 years, 2 months ago) by jfb
Branch: MAIN
Changes since 1.30: +21 -16 lines
Diff to previous 1.30 (colored)

identify ID tokens correctly and fix parsing of RCS files containing
no revisions

Revision 1.30 / (download) - annotate - [select for diffs], Sat Mar 5 03:30:29 2005 UTC (19 years, 2 months ago) by jfb
Branch: MAIN
Changes since 1.29: +39 -1 lines
Diff to previous 1.29 (colored)

functions to manage the locking mode of RCS file

Revision 1.29 / (download) - annotate - [select for diffs], Fri Mar 4 18:21:00 2005 UTC (19 years, 2 months ago) by jfb
Branch: MAIN
Changes since 1.28: +92 -7 lines
Diff to previous 1.28 (colored)

add real support for the `access' keyword, both in parsing and
output; rcs_access_add() can be used to add a new login name to
the access list, and rcs_access_remove() to remove an entry

Revision 1.28 / (download) - annotate - [select for diffs], Thu Mar 3 21:02:23 2005 UTC (19 years, 2 months ago) by jfb
Branch: MAIN
Changes since 1.27: +15 -10 lines
Diff to previous 1.27 (colored)

allow for the creation of RCS files that have no revisions,
therefore no specification for the head revision

Revision 1.27 / (download) - annotate - [select for diffs], Wed Mar 2 04:19:34 2005 UTC (19 years, 2 months ago) by jfb
Branch: MAIN
Changes since 1.26: +106 -3 lines
Diff to previous 1.26 (colored)

- rcs_write() is now static
- when setting a new expansion mode, do not attempt to free the
  previous expansion mode if the pointer is NULL
- add a bunch of new functions:
   * rcs_sym_remove() to remove a symbol
   * rcs_sym_getrev() to retrieve the revision number of a symbol
   * rcs_desc_{s,g}et() to manipulate an RCS file's description

Revision 1.26 / (download) - annotate - [select for diffs], Sun Feb 27 00:22:08 2005 UTC (19 years, 2 months ago) by jfb
Branch: MAIN
Changes since 1.25: +171 -98 lines
Diff to previous 1.25 (colored)

Many improvements to the RCS support:

- make it possible to specify creation and the file mode
  in rcs_open()
- implicitly write the contents to disk on rcs_close() if the
  RCS handle has been changed
- fix a bug in the output of the `expand' keyword
- add functions to retrieve and modify the expansion mode
- rcs_parse() shouldn't be available to the outside
- empty string instead of `(null)' if there is no description

ok Joris

Revision 1.25 / (download) - annotate - [select for diffs], Fri Feb 25 20:32:48 2005 UTC (19 years, 2 months ago) by jfb
Branch: MAIN
Changes since 1.24: +2 -4 lines
Diff to previous 1.24 (colored)

- switch to rcsnum_parse() where appropriate
- make rcsnum_parse() fail if it encounters an invalid character

Revision 1.24 / (download) - annotate - [select for diffs], Wed Feb 16 19:45:59 2005 UTC (19 years, 3 months ago) by jfb
Branch: MAIN
Changes since 1.23: +1 -20 lines
Diff to previous 1.23 (colored)

get rid of unneeded whitespace

Revision 1.23 / (download) - annotate - [select for diffs], Mon Jan 24 20:43:12 2005 UTC (19 years, 3 months ago) by jfb
Branch: MAIN
Changes since 1.22: +7 -4 lines
Diff to previous 1.22 (colored)

more error checking

looks ok from Joris Vink

Revision 1.22 / (download) - annotate - [select for diffs], Fri Jan 14 00:47:44 2005 UTC (19 years, 4 months ago) by jfb
Branch: MAIN
Changes since 1.21: +7 -7 lines
Diff to previous 1.21 (colored)

tweak the output of rcs_kflag_usage() to avoid line wrapping

Revision 1.21 / (download) - annotate - [select for diffs], Thu Jan 13 20:50:57 2005 UTC (19 years, 4 months ago) by jfb
Branch: MAIN
Changes since 1.20: +13 -1 lines
Diff to previous 1.20 (colored)

add rcs_kflag_usage() to display the various keyword expansion modes
supported by the -k argument

Revision 1.20 / (download) - annotate - [select for diffs], Wed Jan 12 19:23:27 2005 UTC (19 years, 4 months ago) by jfb
Branch: MAIN
Changes since 1.19: +51 -1 lines
Diff to previous 1.19 (colored)

add rcs_kflag_get() to validate kflags

Revision 1.19 / (download) - annotate - [select for diffs], Sat Dec 18 17:20:40 2004 UTC (19 years, 5 months ago) by jfb
Branch: MAIN
Changes since 1.18: +3 -1 lines
Diff to previous 1.18 (colored)

when parsing an RCS date, adjust the year by 1900 in the tm structure
so we can use this data with asctime(), mktime() and friends

spotted and patch by Joris Vink

Revision 1.18 / (download) - annotate - [select for diffs], Fri Dec 17 21:13:58 2004 UTC (19 years, 5 months ago) by jfb
Branch: MAIN
Changes since 1.17: +73 -27 lines
Diff to previous 1.17 (colored)

* increase the initial parse buffer size to 16384 bytes
* grow the parse buffer as required in rcs_gettok()
* fix line counting offset

tested by Joris Vink and myself

Revision 1.17 / (download) - annotate - [select for diffs], Thu Dec 16 18:55:52 2004 UTC (19 years, 5 months ago) by jfb
Branch: MAIN
Changes since 1.16: +16 -5 lines
Diff to previous 1.16 (colored)

plug some memory leaks on error cases

Revision 1.16 / (download) - annotate - [select for diffs], Thu Dec 16 17:16:18 2004 UTC (19 years, 5 months ago) by jfb
Branch: MAIN
Changes since 1.15: +13 -1 lines
Diff to previous 1.15 (colored)

Add rcs_gethead() to easily retrieve the head revision of an RCS
file.

Revision 1.15 / (download) - annotate - [select for diffs], Tue Dec 7 17:10:56 2004 UTC (19 years, 5 months ago) by tedu
Branch: MAIN
Changes since 1.14: +12 -17 lines
Diff to previous 1.14 (colored)

less whitespace, more pretty.  ok jfb

Revision 1.14 / (download) - annotate - [select for diffs], Mon Dec 6 21:03:12 2004 UTC (19 years, 5 months ago) by deraadt
Branch: MAIN
Changes since 1.13: +21 -41 lines
Diff to previous 1.13 (colored)

tighten vertical spacing for else; jfb ok

Revision 1.13 / (download) - annotate - [select for diffs], Mon Sep 27 15:33:44 2004 UTC (19 years, 7 months ago) by jfb
Branch: MAIN
Changes since 1.12: +26 -4 lines
Diff to previous 1.12 (colored)

Plug all of the remaining memory leaks using my new Plug-O-Matic 2000(C)

Revision 1.12 / (download) - annotate - [select for diffs], Mon Sep 27 14:36:15 2004 UTC (19 years, 7 months ago) by jfb
Branch: MAIN
Changes since 1.11: +12 -0 lines
Diff to previous 1.11 (colored)

Plug two of the huge leaks that Joris Vink has reported.  rcs_freedelta()
didn't free the RCSNUMs associated with the delta version and next one

Revision 1.11 / (download) - annotate - [select for diffs], Sat Sep 25 11:06:50 2004 UTC (19 years, 7 months ago) by joris
Branch: MAIN
Changes since 1.10: +45 -2 lines
Diff to previous 1.10 (colored)



- check return values for rcsnum_alloc()
- fix crash when parsing an RCS file and the "branch" keyword was found
- allow '-' and '_' characters in rcs_gettok() (used in symbollists for ex.)

Revision 1.10 / (download) - annotate - [select for diffs], Thu Sep 16 15:02:21 2004 UTC (19 years, 8 months ago) by joris
Branch: MAIN
Changes since 1.9: +33 -1 lines
Diff to previous 1.9 (colored)



check value of strdup(3) calls;
ok jfb

Revision 1.9 / (download) - annotate - [select for diffs], Thu Aug 12 21:02:20 2004 UTC (19 years, 9 months ago) by jfb
Branch: MAIN
Changes since 1.8: +0 -1 lines
Diff to previous 1.8 (colored)

Unused variable

Revision 1.8 / (download) - annotate - [select for diffs], Mon Aug 2 22:59:58 2004 UTC (19 years, 9 months ago) by jfb
Branch: MAIN
Changes since 1.7: +0 -1 lines
Diff to previous 1.7 (colored)

Unused variable

Revision 1.7 / (download) - annotate - [select for diffs], Wed Jul 14 20:07:28 2004 UTC (19 years, 10 months ago) by jfb
Branch: MAIN
Changes since 1.6: +26 -20 lines
Diff to previous 1.6 (colored)

* when writing to an RCS file, escape the funny characters
* pretty

Revision 1.6 / (download) - annotate - [select for diffs], Wed Jul 14 19:40:10 2004 UTC (19 years, 10 months ago) by vincent
Branch: MAIN
Changes since 1.5: +14 -8 lines
Diff to previous 1.5 (colored)

fix rcs_findrev()'s searching algorithm

Revision 1.5 / (download) - annotate - [select for diffs], Wed Jul 14 19:22:43 2004 UTC (19 years, 10 months ago) by vincent
Branch: MAIN
Changes since 1.4: +57 -19 lines
Diff to previous 1.4 (colored)

split rcs_patch in rcs_patch/rcs_patchlines

Revision 1.4 / (download) - annotate - [select for diffs], Wed Jul 14 14:09:17 2004 UTC (19 years, 10 months ago) by vincent
Branch: MAIN
Changes since 1.3: +2 -2 lines
Diff to previous 1.3 (colored)

buffers should be freed using cvs_buf_free(), not free()

Revision 1.3 / (download) - annotate - [select for diffs], Wed Jul 14 05:13:06 2004 UTC (19 years, 10 months ago) by vincent
Branch: MAIN
Changes since 1.2: +12 -10 lines
Diff to previous 1.2 (colored)

allocate datenum dynamically (XXX - dont do it for each date)

Revision 1.2 / (download) - annotate - [select for diffs], Wed Jul 14 02:33:40 2004 UTC (19 years, 10 months ago) by vincent
Branch: MAIN
Changes since 1.1: +3 -7 lines
Diff to previous 1.1 (colored)

microoptimization!

Revision 1.1.1.1 / (download) - annotate - [select for diffs] (vendor branch), Tue Jul 13 22:02:40 2004 UTC (19 years, 10 months ago) by jfb
Branch: OpenCVS
CVS Tags: OpenCVS_0_1
Changes since 1.1: +0 -0 lines
Diff to previous 1.1 (colored)

* initial import from the cvs-tools module

Revision 1.1 / (download) - annotate - [select for diffs], Tue Jul 13 22:02:40 2004 UTC (19 years, 10 months ago) by jfb
Branch: MAIN
Branch point for: OpenCVS

Initial revision

This form allows you to request diff's between any two revisions of a file. You may select a symbolic revision name using the selection box or you may type in a numeric name using the type-in text box.