OpenBSD CVS

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


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

Request diff between arbitrary revisions


Default branch: MAIN


Revision 1.127 / (download) - annotate - [select for diffs], Fri Aug 11 05:02:21 2023 UTC (9 months, 1 week ago) by guenther
Branch: MAIN
CVS Tags: OPENBSD_7_5_BASE, OPENBSD_7_5, OPENBSD_7_4_BASE, OPENBSD_7_4, HEAD
Changes since 1.126: +2 -2 lines
Diff to previous 1.126 (colored)

Switch rcs_{get,set}_mtime() from returning and taking a time_t to
doing so with a struct timespec and then use tv_nsec = UTIME_OMIT
instead of a (time_t)-1 as a "do nothing" value.  They can then
fully preserve the timestamp

ok millert@

Revision 1.126 / (download) - annotate - [select for diffs], Fri Jun 28 13:35:03 2019 UTC (4 years, 10 months ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_7_3_BASE, OPENBSD_7_3, 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, OPENBSD_6_8_BASE, OPENBSD_6_8, OPENBSD_6_7_BASE, OPENBSD_6_7, OPENBSD_6_6_BASE, OPENBSD_6_6
Changes since 1.125: +3 -3 lines
Diff to previous 1.125 (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.125 / (download) - annotate - [select for diffs], Fri Apr 26 19:11:01 2019 UTC (5 years ago) by millert
Branch: MAIN
Changes since 1.124: +7 -6 lines
Diff to previous 1.124 (colored)

There was an extra newline in some cases and missing one in others.
OK joris@

Revision 1.124 / (download) - annotate - [select for diffs], Wed Jan 9 18:00:45 2019 UTC (5 years, 4 months ago) by joris
Branch: MAIN
CVS Tags: OPENBSD_6_5_BASE, OPENBSD_6_5
Changes since 1.123: +40 -39 lines
Diff to previous 1.123 (colored)

Delay keyword expansion in co until after the locks have been resolved.

This way the expansion can happen with the correct values and files do not
show up as modified.

Revision 1.123 / (download) - annotate - [select for diffs], Tue Aug 29 16:47:33 2017 UTC (6 years, 8 months ago) by otto
Branch: MAIN
CVS Tags: OPENBSD_6_4_BASE, OPENBSD_6_4, OPENBSD_6_3_BASE, OPENBSD_6_3, OPENBSD_6_2_BASE, OPENBSD_6_2
Changes since 1.122: +9 -6 lines
Diff to previous 1.122 (colored)

kill const and string artithmetic related warnings; ok millert@

Revision 1.122 / (download) - annotate - [select for diffs], Wed Oct 21 16:06:57 2015 UTC (8 years, 7 months ago) by millert
Branch: MAIN
CVS Tags: OPENBSD_6_1_BASE, OPENBSD_6_1, OPENBSD_6_0_BASE, OPENBSD_6_0, OPENBSD_5_9_BASE, OPENBSD_5_9
Changes since 1.121: +2 -2 lines
Diff to previous 1.121 (colored)

Style fixes; from Ilya Kaliman

Revision 1.121 / (download) - annotate - [select for diffs], Sat Jun 13 20:15:21 2015 UTC (8 years, 11 months ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_5_8_BASE, OPENBSD_5_8
Changes since 1.120: +2 -2 lines
Diff to previous 1.120 (colored)

Convert xfree to free. From Fritjof Bornebusch. ok deraadt

Revision 1.120 / (download) - annotate - [select for diffs], Fri Jan 16 06:40:11 2015 UTC (9 years, 4 months ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_5_7_BASE, OPENBSD_5_7
Changes since 1.119: +2 -2 lines
Diff to previous 1.119 (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.119 / (download) - annotate - [select for diffs], Fri Oct 10 08:15:25 2014 UTC (9 years, 7 months ago) by otto
Branch: MAIN
Changes since 1.118: +2 -3 lines
Diff to previous 1.118 (colored)

Zap some stored values never read; From Fritjof Bornebusch; ok nicm@

Revision 1.118 / (download) - annotate - [select for diffs], Thu Oct 2 06:23:15 2014 UTC (9 years, 7 months ago) by otto
Branch: MAIN
Changes since 1.117: +4 -5 lines
Diff to previous 1.117 (colored)

exit in usage functions themselves; from  Fritjof Bornebusch; ok nicm@

Revision 1.117 / (download) - annotate - [select for diffs], Tue Apr 16 20:24:45 2013 UTC (11 years, 1 month ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_5_6_BASE, OPENBSD_5_6, OPENBSD_5_5_BASE, OPENBSD_5_5, OPENBSD_5_4_BASE, OPENBSD_5_4
Changes since 1.116: +2 -2 lines
Diff to previous 1.116 (colored)

remove wrong casts; ok millert

Revision 1.116 / (download) - annotate - [select for diffs], Fri Dec 3 19:44:58 2010 UTC (13 years, 5 months ago) by chl
Branch: MAIN
CVS Tags: 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, OPENBSD_4_9_BASE, OPENBSD_4_9
Changes since 1.115: +2 -1 lines
Diff to previous 1.115 (colored)

add missing header needed by futimes()

ok stsp@

Revision 1.115 / (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.114: +3 -3 lines
Diff to previous 1.114 (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.114 / (download) - annotate - [select for diffs], Wed Sep 8 15:15:50 2010 UTC (13 years, 8 months ago) by tobias
Branch: MAIN
Changes since 1.113: +1 -5 lines
Diff to previous 1.113 (colored)

Set rcs_suffixes to default value on initialization.

ok ray zinovik

Revision 1.113 / (download) - annotate - [select for diffs], Fri Jul 30 21:47:18 2010 UTC (13 years, 9 months ago) by ray
Branch: MAIN
CVS Tags: OPENBSD_4_8_BASE, OPENBSD_4_8
Changes since 1.112: +9 -4 lines
Diff to previous 1.112 (colored)

Check date_parse return values.

OK xsa

Revision 1.112 / (download) - annotate - [select for diffs], Wed Jul 28 09:07:11 2010 UTC (13 years, 9 months ago) by ray
Branch: MAIN
Changes since 1.111: +2 -2 lines
Diff to previous 1.111 (colored)

Make BUFs autoextend by default.  This was already done in OpenCVS
a while ago.

OK zinovik nicm

Revision 1.111 / (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.110: +11 -11 lines
Diff to previous 1.110 (colored)

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

OK xsa zinovik

Revision 1.110 / (download) - annotate - [select for diffs], Wed Feb 25 23:16:20 2009 UTC (15 years, 2 months ago) by ray
Branch: MAIN
CVS Tags: OPENBSD_4_7_BASE, OPENBSD_4_7, OPENBSD_4_6_BASE, OPENBSD_4_6, OPENBSD_4_5_BASE, OPENBSD_4_5
Changes since 1.109: +2 -2 lines
Diff to previous 1.109 (colored)

Checking if a file is ASCII should only be done when diffing, because
the non-ASCII characters could be printed to the screen.  For
checking in files, checking out files, merging files, and removing
revisions of files, we do so regardless of whether the files are
ASCII or binary.

Fixes PR6031.

OK joris and deraadt.

Revision 1.109 / (download) - annotate - [select for diffs], Tue Jul 3 00:56:23 2007 UTC (16 years, 10 months ago) by ray
Branch: MAIN
CVS Tags: OPENBSD_4_4_BASE, OPENBSD_4_4, OPENBSD_4_3_BASE, OPENBSD_4_3, OPENBSD_4_2_BASE, OPENBSD_4_2
Changes since 1.108: +3 -3 lines
Diff to previous 1.108 (colored)

Rename rcs_diffreg() to diffreg().

OK joris@

Revision 1.108 / (download) - annotate - [select for diffs], Sat Jun 30 08:23:49 2007 UTC (16 years, 10 months ago) by xsa
Branch: MAIN
Changes since 1.107: +2 -2 lines
Diff to previous 1.107 (colored)

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

Revision 1.107 / (download) - annotate - [select for diffs], Fri Jun 8 16:45:52 2007 UTC (16 years, 11 months ago) by xsa
Branch: MAIN
Changes since 1.106: +5 -1 lines
Diff to previous 1.106 (colored)

If strict locking is disabled, make file writable by owner on checkout.
Matches GNU's behaviour. From Pierre Riteau (long time ago).

Revision 1.106 / (download) - annotate - [select for diffs], Thu Jun 7 09:08:54 2007 UTC (16 years, 11 months ago) by xsa
Branch: MAIN
Changes since 1.105: +8 -6 lines
Diff to previous 1.105 (colored)

Correct exit value when one of the files specified cannot be checked out.
Matches GNU's behaviour. From Pierre Riteau (long time ago).

Revision 1.105 / (download) - annotate - [select for diffs], Tue Feb 27 07:59:13 2007 UTC (17 years, 2 months ago) by xsa
Branch: MAIN
CVS Tags: OPENBSD_4_1_BASE, OPENBSD_4_1
Changes since 1.104: +9 -2 lines
Diff to previous 1.104 (colored)

As done in OpenCVS, general includes cleanup sweep. OK otto@.

Revision 1.104 / (download) - annotate - [select for diffs], Thu Feb 22 19:11:13 2007 UTC (17 years, 2 months ago) by otto
Branch: MAIN
Changes since 1.103: +6 -1 lines
Diff to previous 1.103 (colored)

If a ,suffix file is given as an arg to ci and co, strip it. Avoids
potential disasters.  Initial diff from niallo@, ok niallo@ joris@

Revision 1.103 / (download) - annotate - [select for diffs], Wed Feb 21 18:12:36 2007 UTC (17 years, 3 months ago) by niallo
Branch: MAIN
Changes since 1.102: +3 -1 lines
Diff to previous 1.102 (colored)

make sure checkout_rev() sets correct file permissions via file->rf_mode
in case where fstat() of file->rf_fd won't give us right mode.

fixes PR #5383

ok xsa@

Revision 1.102 / (download) - annotate - [select for diffs], Sun Feb 18 20:54:18 2007 UTC (17 years, 3 months ago) by xsa
Branch: MAIN
Changes since 1.101: +2 -2 lines
Diff to previous 1.101 (colored)

keep correct permissions on the RCS file when locking/unlocking the file
with ci and co. fixes PR 5379.
OK millert@ joris@.

Revision 1.101 / (download) - annotate - [select for diffs], Thu Feb 1 18:01:42 2007 UTC (17 years, 3 months ago) by millert
Branch: MAIN
Changes since 1.100: +5 -1 lines
Diff to previous 1.100 (colored)

When checking to see if a checked-out copy of the file is the same
as what is in the repo, expand keywords before doing the diff.
OK xsa@

Revision 1.100 / (download) - annotate - [select for diffs], Fri Nov 10 16:31:29 2006 UTC (17 years, 6 months ago) by millert
Branch: MAIN
Changes since 1.99: +62 -25 lines
Diff to previous 1.99 (colored)

Unlike GNU rcs, our co will not overwrite an existing file, even
if the existing file is not writable.  While safer, this can be
annoying.  I've changed things to compare the version of the file
being checked out with its current contents and, if they are the
same, to allow the checkout without user intervention.  The behavior
when there is a writable version of the file is unchanged.  OK xsa@

Revision 1.99 / (download) - annotate - [select for diffs], Thu Nov 9 21:47:52 2006 UTC (17 years, 6 months ago) by millert
Branch: MAIN
Changes since 1.98: +9 -16 lines
Diff to previous 1.98 (colored)

Simplify stripping of write bits from file mode.
Add support for reusing the checkin message for multiple files, ala GNU
Fix the message when you abort a checkout and the file was not writable.
OK joris@ niallo@

Revision 1.98 / (download) - annotate - [select for diffs], Thu Oct 12 17:20:12 2006 UTC (17 years, 7 months ago) by niallo
Branch: MAIN
Changes since 1.97: +2 -2 lines
Diff to previous 1.97 (colored)

- convert some warnx() to warn(), which fixes a few stupidly un-informative error messages (found by tom@)
- make rcs_choosefile() save wrt errno, input from ray@

ok joris@ xsa@

Revision 1.97 / (download) - annotate - [select for diffs], Mon Aug 7 20:55:28 2006 UTC (17 years, 9 months ago) by ray
Branch: MAIN
CVS Tags: OPENBSD_4_0_BASE, OPENBSD_4_0
Changes since 1.96: +5 -13 lines
Diff to previous 1.96 (colored)

More strlcpy/strlcat -> snprintf/xasprintf cleanup.

OK joris@

Revision 1.96 / (download) - annotate - [select for diffs], Tue Aug 1 05:14:17 2006 UTC (17 years, 9 months ago) by ray
Branch: MAIN
Changes since 1.95: +7 -10 lines
Diff to previous 1.95 (colored)

Reduce rcs_buf_release() usage, improving binary support.

OK niallo@

Revision 1.95 / (download) - annotate - [select for diffs], Sat Jun 3 03:05:10 2006 UTC (17 years, 11 months ago) by niallo
Branch: MAIN
Changes since 1.94: +1 -2 lines
Diff to previous 1.94 (colored)

- correctly handle binary files; say bye bye to using c strings for deltatexts.

"slap it in" joris@

Revision 1.94 / (download) - annotate - [select for diffs], Sun May 28 23:16:31 2006 UTC (17 years, 11 months ago) by ray
Branch: MAIN
Changes since 1.93: +10 -22 lines
Diff to previous 1.93 (colored)

Remove a lot of xstrdup() calls in getopt() loops, which are usually
unnecessary.  These xstrdup() calls don't call xfree() before anyway,
so if a flag is given multiple times memory leaks would have resulted.

OK joris@

Revision 1.93 / (download) - annotate - [select for diffs], Sat May 27 08:12:29 2006 UTC (17 years, 11 months ago) by ray
Branch: MAIN
Changes since 1.92: +5 -5 lines
Diff to previous 1.92 (colored)

Rename RCSFILE.fd to RCSFILE.rf_fd, plus minor spacing nits.  No
binary change.

OK xsa@

Revision 1.92 / (download) - annotate - [select for diffs], Sat May 27 05:49:14 2006 UTC (17 years, 11 months ago) by ray
Branch: MAIN
Changes since 1.91: +5 -3 lines
Diff to previous 1.91 (colored)

Remove rcs_statfile().  It was just a wrapper for rcs_choosefile(),
handling exceptions oddly.

OK joris@

Revision 1.91 / (download) - annotate - [select for diffs], Wed May 17 19:37:40 2006 UTC (18 years ago) by xsa
Branch: MAIN
Changes since 1.90: +8 -8 lines
Diff to previous 1.90 (colored)

fix printf's

Revision 1.90 / (download) - annotate - [select for diffs], Thu May 11 09:43:19 2006 UTC (18 years ago) by xsa
Branch: MAIN
Changes since 1.89: +9 -8 lines
Diff to previous 1.89 (colored)

fix informative msg's wrt to -q and stderr. now matches gnu/usr.bin/rcs.

Revision 1.89 / (download) - annotate - [select for diffs], Tue May 9 12:33:42 2006 UTC (18 years ago) by ray
Branch: MAIN
Changes since 1.88: +1 -2 lines
Diff to previous 1.88 (colored)

Remove /* NOTREACHED */ comments, now that lint is smart about
__dead.  I never should have put them there.

OK xsa@.

Revision 1.88 / (download) - annotate - [select for diffs], Fri May 5 01:29:59 2006 UTC (18 years ago) by ray
Branch: MAIN
Changes since 1.87: +5 -6 lines
Diff to previous 1.87 (colored)

o GNU ci returns 0 when a file is reverted (co -l file; ci file).
o Don't unlock file after revert.
o Fix spelling.

Passes extra tests in GNU rcstest.

OK niallo@.

Revision 1.87 / (download) - annotate - [select for diffs], Sat Apr 29 05:31:28 2006 UTC (18 years ago) by ray
Branch: MAIN
Changes since 1.86: +7 -5 lines
Diff to previous 1.86 (colored)

Check return values for all strlcpy, and strlcat calls.

OK xsa@ and probably others.

Revision 1.86 / (download) - annotate - [select for diffs], Wed Apr 26 21:55:22 2006 UTC (18 years ago) by joris
Branch: MAIN
Changes since 1.85: +42 -19 lines
Diff to previous 1.85 (colored)

prevent file races by obtaining an fd for the RCS file and
do our operations on that, this is safe and guarantees we
can operate on the file until we close(2) it.

a fix is coming for the remaining races in our diff code.
okay niallo@ and ray@

Revision 1.85 / (download) - annotate - [select for diffs], Wed Apr 26 02:55:13 2006 UTC (18 years ago) by joris
Branch: MAIN
Changes since 1.84: +10 -10 lines
Diff to previous 1.84 (colored)

fork our code we shared between openrcs/cvs into the openrcs dir.

this was starting to become inhuman to maintain without
ugly ugly hacks in the shared code, and it will be easier
to make specific changes for openrcs without touching the
soon-to-be-replaced opencvs code.

Revision 1.84 / (download) - annotate - [select for diffs], Tue Apr 25 13:36:35 2006 UTC (18 years ago) by xsa
Branch: MAIN
Changes since 1.83: +6 -6 lines
Diff to previous 1.83 (colored)

fatal() -> err()/errx() as we try to not depend on heavy cvs_log().
OK joriski.

Revision 1.83 / (download) - annotate - [select for diffs], Mon Apr 24 08:10:41 2006 UTC (18 years ago) by xsa
Branch: MAIN
Changes since 1.82: +2 -2 lines
Diff to previous 1.82 (colored)

be consistent in error messages for wrongly specified keyword substitution
mode for `-k'.

Revision 1.82 / (download) - annotate - [select for diffs], Fri Apr 21 17:17:29 2006 UTC (18 years, 1 month ago) by xsa
Branch: MAIN
Changes since 1.81: +2 -2 lines
Diff to previous 1.81 (colored)

move shared functions into rcsutil.[ch]; this makes rcsprog.c cleaner;
"the voices in my head say OK!" joris@.

Revision 1.81 / (download) - annotate - [select for diffs], Fri Apr 21 14:18:26 2006 UTC (18 years, 1 month ago) by xsa
Branch: MAIN
Changes since 1.80: +19 -24 lines
Diff to previous 1.80 (colored)

remove overkill cvs_log() and rather use warn()/warnx().
OK ray@ and discussed with joris@.

Revision 1.80 / (download) - annotate - [select for diffs], Fri Apr 21 07:06:25 2006 UTC (18 years, 1 month ago) by xsa
Branch: MAIN
Changes since 1.79: +5 -5 lines
Diff to previous 1.79 (colored)

switch -p handling to bitwise flags; OK ray@.

Revision 1.79 / (download) - annotate - [select for diffs], Wed Apr 19 06:53:41 2006 UTC (18 years, 1 month ago) by xsa
Branch: MAIN
Changes since 1.78: +11 -11 lines
Diff to previous 1.78 (colored)

switch -q handling to bitwise flags; OK ray@ niallo@.

Revision 1.78 / (download) - annotate - [select for diffs], Sat Apr 15 16:28:07 2006 UTC (18 years, 1 month ago) by pat
Branch: MAIN
Changes since 1.77: +16 -11 lines
Diff to previous 1.77 (colored)

Plug some memory leaks; ok niallo@

Revision 1.77 / (download) - annotate - [select for diffs], Fri Apr 14 01:11:07 2006 UTC (18 years, 1 month ago) by deraadt
Branch: MAIN
Changes since 1.76: +23 -23 lines
Diff to previous 1.76 (colored)

excessive addition to brackets is a mental disease.  you will go
blind, too.  seek help.  no binary change, ok joris

Revision 1.76 / (download) - annotate - [select for diffs], Thu Apr 13 03:18:06 2006 UTC (18 years, 1 month ago) by joris
Branch: MAIN
Changes since 1.75: +76 -35 lines
Diff to previous 1.75 (colored)

correctly handle RCS files without any revisions;
original diff from ray@, crafted into shape by myself.

okay ray@

Revision 1.75 / (download) - annotate - [select for diffs], Thu Apr 13 00:58:25 2006 UTC (18 years, 1 month ago) by ray
Branch: MAIN
Changes since 1.74: +5 -4 lines
Diff to previous 1.74 (colored)

*** empty log message ***

Revision 1.74 / (download) - annotate - [select for diffs], Wed Apr 12 08:27:31 2006 UTC (18 years, 1 month ago) by deraadt
Branch: MAIN
Changes since 1.73: +2 -2 lines
Diff to previous 1.73 (colored)

spaces

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

Clean up <rev> handling.  Whenever a revision is specified after a
flag, it calls one of two new functions: rcs_setrevstr() or
rcs_setrevstr2().  rcs_setrevstr() sets a string to another string,
and complains if it was set more than once.  rcs_setrevstr2() takes
two strings, sets one after the other, and fatal()s if more than
two strings were given.

All <rev> handling is now done in the loop that goes through each
argv.  This is necessary for parsing symbols, which will be much
easier after this.

Along the way a lot of memory leaks were cleaned up.  There is one
area where rcs_set_rev() is called, which allocates a RCSNUM and
stores it in pb.newrev, but it segfaults whenever I try to rcsnum_free()
it.  I put an /* XXX */ comment there for now.

Passes regression tests and the code is less complicated in some
ways (to me).

Suggestions and OK xsa@

Revision 1.72 / (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.71: +2 -3 lines
Diff to previous 1.71 (colored)

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

Revision 1.71 / (download) - annotate - [select for diffs], Sun Apr 9 19:22:23 2006 UTC (18 years, 1 month ago) by niallo
Branch: MAIN
Changes since 1.70: +12 -6 lines
Diff to previous 1.70 (colored)

- don't print out warnings about locking when they are actually wrong and
just confuse the user.

ok and input joris@

Revision 1.70 / (download) - annotate - [select for diffs], Thu Apr 6 10:13:00 2006 UTC (18 years, 1 month ago) by xsa
Branch: MAIN
Changes since 1.69: +2 -2 lines
Diff to previous 1.69 (colored)

-z can take no argument.

Revision 1.69 / (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.68: +22 -11 lines
Diff to previous 1.68 (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.68 / (download) - annotate - [select for diffs], Wed Mar 29 08:44:08 2006 UTC (18 years, 1 month ago) by ray
Branch: MAIN
Changes since 1.67: +20 -10 lines
Diff to previous 1.67 (colored)

More closely matches GNU behavior, passes more GNU rcstest tests.

OK niallo@

Revision 1.67 / (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.66: +16 -3 lines
Diff to previous 1.66 (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.66 / (download) - annotate - [select for diffs], Fri Mar 24 05:14:48 2006 UTC (18 years, 2 months ago) by ray
Branch: MAIN
Changes since 1.65: +4 -3 lines
Diff to previous 1.65 (colored)

Allow the -x flag to be used without an extension.

``that makes sense'' xsa@

Revision 1.65 / (download) - annotate - [select for diffs], Fri Mar 17 13:09:26 2006 UTC (18 years, 2 months ago) by niallo
Branch: MAIN
Changes since 1.64: +7 -2 lines
Diff to previous 1.64 (colored)

- co usage() says we support -I, so set the flags and revision.

ok xsa@

Revision 1.64 / (download) - annotate - [select for diffs], Thu Mar 16 23:53:27 2006 UTC (18 years, 2 months ago) by niallo
Branch: MAIN
Changes since 1.63: +6 -6 lines
Diff to previous 1.63 (colored)

- checkout_rev() can fail, in which case we want a non-zero exit code.

ok joris@

Revision 1.63 / (download) - annotate - [select for diffs], Thu Mar 16 17:11:30 2006 UTC (18 years, 2 months ago) by xsa
Branch: MAIN
Changes since 1.62: +4 -3 lines
Diff to previous 1.62 (colored)

error message fix; respect -q too. Ok ray@.

Revision 1.62 / (download) - annotate - [select for diffs], Thu Mar 16 04:04:57 2006 UTC (18 years, 2 months ago) by ray
Branch: MAIN
Changes since 1.61: +2 -1 lines
Diff to previous 1.61 (colored)

Follow exit() with /* NOTREACHED*/ for lint.

``OK niallo@'' niallo@

Revision 1.61 / (download) - annotate - [select for diffs], Thu Mar 16 04:01:46 2006 UTC (18 years, 2 months ago) by ray
Branch: MAIN
Changes since 1.60: +17 -17 lines
Diff to previous 1.60 (colored)

Currently co(1) overwrites files that the current user doesn't have
write permissions for.  If you own the directory, that means your
existing file, mode 000, is blown away without prompting you.  GNU
RCS does this as well.

This fixes changes co(1) to always prompt if a file exists.  This
breaks GNU compatibility but I think it's more important that we
prevent co(1) from overwriting files with strict permissions without
even prompting.

``makes sense'' xsa to an earlier diff

Revision 1.60 / (download) - annotate - [select for diffs], Wed Mar 15 20:00:50 2006 UTC (18 years, 2 months ago) by niallo
Branch: MAIN
Changes since 1.59: +8 -13 lines
Diff to previous 1.59 (colored)

- use shared cvs_yesno() for yesno prompt, fixing an issue spotted by
deraadt@

- while here, remove unecessary cast also spotted by deraadt@

ok ray@ xsa@

Revision 1.59 / (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.58: +5 -2 lines
Diff to previous 1.58 (colored)

-z support for RCS;

Revision 1.58 / (download) - annotate - [select for diffs], Mon Mar 6 14:03:33 2006 UTC (18 years, 2 months ago) by xsa
Branch: MAIN
Changes since 1.57: +4 -1 lines
Diff to previous 1.57 (colored)

missing informative message after call to checkout_rev().

Revision 1.57 / (download) - annotate - [select for diffs], Mon Mar 6 13:49:24 2006 UTC (18 years, 2 months ago) by xsa
Branch: MAIN
Changes since 1.56: +3 -3 lines
Diff to previous 1.56 (colored)

should also have removed those newlines in previous commit.

Revision 1.56 / (download) - annotate - [select for diffs], Mon Mar 6 13:47:34 2006 UTC (18 years, 2 months ago) by xsa
Branch: MAIN
Changes since 1.55: +4 -1 lines
Diff to previous 1.55 (colored)

missing newline in checkout_rev(); spotted by joris@.

Revision 1.55 / (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.54: +5 -1 lines
Diff to previous 1.54 (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.54 / (download) - annotate - [select for diffs], Fri Feb 24 14:34:56 2006 UTC (18 years, 2 months ago) by xsa
Branch: MAIN
CVS Tags: OPENBSD_3_9_BASE, OPENBSD_3_9
Changes since 1.53: +1 -4 lines
Diff to previous 1.53 (colored)

remove extra printf;

Revision 1.53 / (download) - annotate - [select for diffs], Tue Feb 14 13:28:38 2006 UTC (18 years, 3 months ago) by xsa
Branch: MAIN
Changes since 1.52: +15 -10 lines
Diff to previous 1.52 (colored)

- fix behaviour when using -u and -l at the same time
- do not display some messages when checking in a file for the first time
OK niallo@.

Revision 1.52 / (download) - annotate - [select for diffs], Thu Jan 5 10:28:24 2006 UTC (18 years, 4 months ago) by xsa
Branch: MAIN
Changes since 1.51: +1 -3 lines
Diff to previous 1.51 (colored)

cleanup, move log.h and rcs.h inclusion into rcsprog.h;

Revision 1.51 / (download) - annotate - [select for diffs], Mon Jan 2 08:13:28 2006 UTC (18 years, 4 months ago) by xsa
Branch: MAIN
Changes since 1.50: +2 -8 lines
Diff to previous 1.50 (colored)

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

Revision 1.50 / (download) - annotate - [select for diffs], Tue Dec 27 16:05:21 2005 UTC (18 years, 4 months ago) by niallo
Branch: MAIN
Changes since 1.49: +2 -2 lines
Diff to previous 1.49 (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.49 / (download) - annotate - [select for diffs], Fri Dec 23 00:59:56 2005 UTC (18 years, 5 months ago) by joris
Branch: MAIN
Changes since 1.48: +26 -8 lines
Diff to previous 1.48 (colored)

support co -d, which checks out the first revision who's
date is less than or equal to the given date.

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

use fatal() if getlogin() fails;

Revision 1.47 / (download) - annotate - [select for diffs], Sat Dec 10 20:27:46 2005 UTC (18 years, 5 months ago) by joris
Branch: MAIN
Changes since 1.46: +5 -11 lines
Diff to previous 1.46 (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.46 / (download) - annotate - [select for diffs], Fri Dec 9 06:59:27 2005 UTC (18 years, 5 months ago) by joris
Branch: MAIN
Changes since 1.45: +5 -3 lines
Diff to previous 1.45 (colored)

if we are removing a lock that's not present, just check
out the file without complaining;

Revision 1.45 / (download) - annotate - [select for diffs], Fri Dec 9 04:27:01 2005 UTC (18 years, 5 months ago) by joris
Branch: MAIN
Changes since 1.44: +2 -3 lines
Diff to previous 1.44 (colored)

unused vars, my bad;

Revision 1.44 / (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.43: +92 -69 lines
Diff to previous 1.43 (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.43 / (download) - annotate - [select for diffs], Mon Dec 5 19:46:24 2005 UTC (18 years, 5 months ago) by xsa
Branch: MAIN
Changes since 1.42: +43 -5 lines
Diff to previous 1.42 (colored)

correctly handle `-wfoo' and `-sbar' errors; OK joris@.

Revision 1.42 / (download) - annotate - [select for diffs], Fri Dec 2 11:45:02 2005 UTC (18 years, 5 months ago) by xsa
Branch: MAIN
Changes since 1.41: +4 -4 lines
Diff to previous 1.41 (colored)

`-mmsg' does not belong here;

Revision 1.41 / (download) - annotate - [select for diffs], Wed Nov 30 18:50:51 2005 UTC (18 years, 5 months ago) by xsa
Branch: MAIN
Changes since 1.40: +7 -4 lines
Diff to previous 1.40 (colored)

check for ownership of already present writable file when checking out;

Revision 1.40 / (download) - annotate - [select for diffs], Wed Nov 30 14:29:22 2005 UTC (18 years, 5 months ago) by xsa
Branch: MAIN
Changes since 1.39: +3 -3 lines
Diff to previous 1.39 (colored)

writeable -> writable

Revision 1.39 / (download) - annotate - [select for diffs], Tue Nov 29 11:11:39 2005 UTC (18 years, 5 months ago) by xsa
Branch: MAIN
Changes since 1.38: +7 -9 lines
Diff to previous 1.38 (colored)

consistency in variables naming;

Revision 1.38 / (download) - annotate - [select for diffs], Tue Nov 29 10:55:37 2005 UTC (18 years, 5 months ago) by xsa
Branch: MAIN
Changes since 1.37: +16 -11 lines
Diff to previous 1.37 (colored)

some more bits for `-w[user]' support;

Revision 1.37 / (download) - annotate - [select for diffs], Fri Nov 25 13:50:01 2005 UTC (18 years, 5 months ago) by xsa
Branch: MAIN
Changes since 1.36: +13 -7 lines
Diff to previous 1.36 (colored)

add support for `-T' and enable it for co(1);
tested and OK niallo@. "Looks good" joris@.

Revision 1.36 / (download) - annotate - [select for diffs], Thu Nov 24 15:35:11 2005 UTC (18 years, 5 months ago) by xsa
Branch: MAIN
Changes since 1.35: +2 -2 lines
Diff to previous 1.35 (colored)

memset();

Revision 1.35 / (download) - annotate - [select for diffs], Wed Nov 23 13:59:07 2005 UTC (18 years, 5 months ago) by xsa
Branch: MAIN
Changes since 1.34: +6 -1 lines
Diff to previous 1.34 (colored)

cannot combine -kv and -l;

Revision 1.34 / (download) - annotate - [select for diffs], Wed Nov 23 09:39:20 2005 UTC (18 years, 5 months ago) by xsa
Branch: MAIN
Changes since 1.33: +4 -1 lines
Diff to previous 1.33 (colored)

initial bits for -T support;

Revision 1.33 / (download) - annotate - [select for diffs], Wed Nov 23 09:05:02 2005 UTC (18 years, 5 months ago) by xsa
Branch: MAIN
Changes since 1.32: +16 -4 lines
Diff to previous 1.32 (colored)

add support for `-kmode';

Revision 1.32 / (download) - annotate - [select for diffs], Wed Nov 23 08:42:23 2005 UTC (18 years, 5 months ago) by xsa
Branch: MAIN
Changes since 1.31: +6 -4 lines
Diff to previous 1.31 (colored)

sync SYNOPSIS with Reality and usage() accordingly;

Revision 1.31 / (download) - annotate - [select for diffs], Tue Nov 22 16:20:45 2005 UTC (18 years, 6 months ago) by xsa
Branch: MAIN
Changes since 1.30: +2 -2 lines
Diff to previous 1.30 (colored)

make `-p' work again as expected;

Revision 1.30 / (download) - annotate - [select for diffs], Mon Nov 21 16:20:29 2005 UTC (18 years, 6 months ago) by xsa
Branch: MAIN
Changes since 1.29: +5 -2 lines
Diff to previous 1.29 (colored)

enable `-xsuffixes' support as it has been added a few days ago
in rcs_statfile();
niallo ok

Revision 1.29 / (download) - annotate - [select for diffs], Tue Nov 8 09:22:47 2005 UTC (18 years, 6 months ago) by xsa
Branch: MAIN
Changes since 1.28: +2 -2 lines
Diff to previous 1.28 (colored)

nuke trailing whitespaces;

Revision 1.28 / (download) - annotate - [select for diffs], Thu Nov 3 16:08:03 2005 UTC (18 years, 6 months ago) by niallo
Branch: MAIN
Changes since 1.27: +2 -5 lines
Diff to previous 1.27 (colored)

- update comment for checkout_rev() for bitwise flags.

Revision 1.27 / (download) - annotate - [select for diffs], Thu Nov 3 15:41:52 2005 UTC (18 years, 6 months ago) by niallo
Branch: MAIN
Changes since 1.26: +3 -3 lines
Diff to previous 1.26 (colored)

- sync checkout_usage();

Revision 1.26 / (download) - annotate - [select for diffs], Thu Nov 3 15:40:40 2005 UTC (18 years, 6 months ago) by niallo
Branch: MAIN
Changes since 1.25: +6 -2 lines
Diff to previous 1.25 (colored)

- implement `-M' option.

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

- update the comment for checkout_state(); it did not tell the truth
  about values returned.

Revision 1.24 / (download) - annotate - [select for diffs], Wed Nov 2 20:32:45 2005 UTC (18 years, 6 months ago) by niallo
Branch: MAIN
Changes since 1.23: +74 -19 lines
Diff to previous 1.23 (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.23 / (download) - annotate - [select for diffs], Tue Oct 25 17:27:54 2005 UTC (18 years, 6 months ago) by xsa
Branch: MAIN
Changes since 1.22: +4 -3 lines
Diff to previous 1.22 (colored)

nuke trailing whitespaces;

Revision 1.22 / (download) - annotate - [select for diffs], Thu Oct 20 17:10:01 2005 UTC (18 years, 7 months ago) by xsa
Branch: MAIN
Changes since 1.21: +3 -2 lines
Diff to previous 1.21 (colored)

fix output if -p is specified; joris ok

Revision 1.21 / (download) - annotate - [select for diffs], Wed Oct 19 11:37:11 2005 UTC (18 years, 7 months ago) by niallo
Branch: MAIN
Changes since 1.20: +14 -8 lines
Diff to previous 1.20 (colored)

- make a bunch of changes to how we handle verbose output. this brings us
much closer in line with GNU RCS and cleans things up in general.

ok joris@, "looks fine to me" xsa@

Revision 1.20 / (download) - annotate - [select for diffs], Wed Oct 19 00:30:22 2005 UTC (18 years, 7 months ago) by joris
Branch: MAIN
Changes since 1.19: +21 -10 lines
Diff to previous 1.19 (colored)

add co -p support;
input from xsa@ and niallo@;

Revision 1.19 / (download) - annotate - [select for diffs], Tue Oct 18 01:22:14 2005 UTC (18 years, 7 months ago) by joris
Branch: MAIN
Changes since 1.18: +5 -37 lines
Diff to previous 1.18 (colored)

use rcs_set_rev() instead of duplicating code all over the
place to set a variable to the given revision number;

Revision 1.18 / (download) - annotate - [select for diffs], Mon Oct 17 15:33:12 2005 UTC (18 years, 7 months ago) by joris
Branch: MAIN
Changes since 1.17: +52 -16 lines
Diff to previous 1.17 (colored)

support -f flag for co;
'fine' niallo@

Revision 1.17 / (download) - annotate - [select for diffs], Sun Oct 16 15:46:07 2005 UTC (18 years, 7 months ago) by joris
Branch: MAIN
Changes since 1.16: +8 -1 lines
Diff to previous 1.16 (colored)

spacing;

Revision 1.16 / (download) - annotate - [select for diffs], Sun Oct 16 11:59:06 2005 UTC (18 years, 7 months ago) by niallo
Branch: MAIN
Changes since 1.15: +2 -2 lines
Diff to previous 1.15 (colored)

- sync checkout_usage();

Revision 1.15 / (download) - annotate - [select for diffs], Sat Oct 15 21:23:54 2005 UTC (18 years, 7 months ago) by niallo
Branch: MAIN
Changes since 1.14: +16 -13 lines
Diff to previous 1.14 (colored)

- if revision passed to checkout_rev() is > HEAD, assume HEAD
  (like GNU RCS).
- move verbose output into checkout_rev() function itself.

"looks sane" joris@

Revision 1.14 / (download) - annotate - [select for diffs], Sat Oct 15 18:26:24 2005 UTC (18 years, 7 months ago) by niallo
Branch: MAIN
Changes since 1.13: +57 -35 lines
Diff to previous 1.13 (colored)

modularise checkout code into checkout_rev(). this shaves off a number
of lines in ci.c due to code re-use, and will simplify features which are in
the pipeline. no functional changes.

ok joris@

Revision 1.13 / (download) - annotate - [select for diffs], Thu Oct 13 12:35:30 2005 UTC (18 years, 7 months ago) by joris
Branch: MAIN
Changes since 1.12: +10 -10 lines
Diff to previous 1.12 (colored)

To be fully compatibly with the GNU RCS tools we need to have the
same way of parsing commandline options. Since getopt(3) allows spaces
between arguments and GNU RCS tools does not we needed to roll out our
own way of option handling, and here it is.

ok niallo@

Revision 1.12 / (download) - annotate - [select for diffs], Wed Oct 12 17:43:18 2005 UTC (18 years, 7 months ago) by xsa
Branch: MAIN
Changes since 1.11: +2 -2 lines
Diff to previous 1.11 (colored)

minor knf;

Revision 1.11 / (download) - annotate - [select for diffs], Wed Oct 12 17:13:30 2005 UTC (18 years, 7 months ago) by deraadt
Branch: MAIN
Changes since 1.10: +4 -6 lines
Diff to previous 1.10 (colored)

various usage cleanup; ok joris

Revision 1.10 / (download) - annotate - [select for diffs], Mon Oct 10 17:12:49 2005 UTC (18 years, 7 months ago) by xsa
Branch: MAIN
Changes since 1.9: +2 -2 lines
Diff to previous 1.9 (colored)

getlogin(2) sets errno;

Revision 1.9 / (download) - annotate - [select for diffs], Mon Oct 10 13:32:16 2005 UTC (18 years, 7 months ago) by niallo
Branch: MAIN
Changes since 1.8: +3 -3 lines
Diff to previous 1.8 (colored)

sync checkout_usage();

Revision 1.8 / (download) - annotate - [select for diffs], Mon Oct 10 13:20:20 2005 UTC (18 years, 7 months ago) by niallo
Branch: MAIN
Changes since 1.7: +30 -28 lines
Diff to previous 1.7 (colored)

- set permissions on checked out files correctly
- support bare `-u' and `-l' options which will check out HEAD.

note that with OpenRCS you must do `co -l -- <file>' and `co -u -- <file>'
when using bare arguments because our getopt(3) is POSIX compliant.

ok joris@

Revision 1.7 / (download) - annotate - [select for diffs], Wed Oct 5 12:06:23 2005 UTC (18 years, 7 months ago) by joris
Branch: MAIN
Changes since 1.6: +7 -3 lines
Diff to previous 1.6 (colored)

sync usage and add V flag;

Revision 1.6 / (download) - annotate - [select for diffs], Wed Oct 5 11:52:16 2005 UTC (18 years, 7 months ago) by joris
Branch: MAIN
Changes since 1.5: +8 -3 lines
Diff to previous 1.5 (colored)

- stop gcc's yapping;
- better output when locking and unlocking revisions;

Revision 1.5 / (download) - annotate - [select for diffs], Wed Oct 5 00:44:19 2005 UTC (18 years, 7 months ago) by joris
Branch: MAIN
Changes since 1.4: +2 -5 lines
Diff to previous 1.4 (colored)

- better output
- free frev when done

Revision 1.4 / (download) - annotate - [select for diffs], Tue Oct 4 23:04:33 2005 UTC (18 years, 7 months ago) by joris
Branch: MAIN
Changes since 1.3: +84 -11 lines
Diff to previous 1.3 (colored)

- support -l and -u flags;
- better output;

Revision 1.3 / (download) - annotate - [select for diffs], Thu Sep 29 21:30:10 2005 UTC (18 years, 7 months ago) by joris
Branch: MAIN
Changes since 1.2: +5 -2 lines
Diff to previous 1.2 (colored)

support -q flag in 'co' and 'rcs'

Revision 1.2 / (download) - annotate - [select for diffs], Thu Sep 29 15:21:57 2005 UTC (18 years, 7 months ago) by joris
Branch: MAIN
Changes since 1.1: +2 -2 lines
Diff to previous 1.1 (colored)

fix usage

Revision 1.1 / (download) - annotate - [select for diffs], Thu Sep 29 15:16:26 2005 UTC (18 years, 7 months ago) by joris
Branch: MAIN

put it basic checkout code

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.