OpenBSD CVS

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


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

Request diff between arbitrary revisions


Default branch: MAIN


Revision 1.162 / (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_7_5_BASE, OPENBSD_7_5, OPENBSD_7_4_BASE, OPENBSD_7_4, 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, HEAD
Changes since 1.161: +2 -2 lines
Diff to previous 1.161 (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.161 / (download) - annotate - [select for diffs], Mon Aug 28 19:33:20 2017 UTC (6 years, 8 months ago) by otto
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.160: +2 -2 lines
Diff to previous 1.160 (colored)

fix const related warnings; ok millert@

Revision 1.160 / (download) - annotate - [select for diffs], Thu Jun 1 08:08:24 2017 UTC (6 years, 11 months ago) by joris
Branch: MAIN
Changes since 1.159: +3 -5 lines
Diff to previous 1.159 (colored)

Stop looking at current_cvsroot->cr_method to figure out if we're remote or not.

Instead use cvsroot_is_local() and cvsroot_is_remote().

Revision 1.159 / (download) - annotate - [select for diffs], Thu Oct 13 20:51:25 2016 UTC (7 years, 7 months ago) by fcambus
Branch: MAIN
CVS Tags: OPENBSD_6_1_BASE, OPENBSD_6_1
Changes since 1.158: +3 -3 lines
Diff to previous 1.158 (colored)

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

OK millert@

Revision 1.158 / (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.157: +13 -14 lines
Diff to previous 1.157 (colored)

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

Revision 1.157 / (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.156: +7 -7 lines
Diff to previous 1.156 (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.156 / (download) - annotate - [select for diffs], Mon Dec 1 21:58:46 2014 UTC (9 years, 5 months ago) by deraadt
Branch: MAIN
Changes since 1.155: +2 -2 lines
Diff to previous 1.155 (colored)

An internal function called xrealloc() is actually a fail-hard
reallocarray()... so rename it.

Revision 1.155 / (download) - annotate - [select for diffs], Wed Apr 20 18:43:57 2011 UTC (13 years, 1 month ago) by nicm
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, 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.154: +1 -2 lines
Diff to previous 1.154 (colored)

Remove some includes and defines that are no longer needed, from Michael
W Bombardieri.

Revision 1.154 / (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.153: +1 -24 lines
Diff to previous 1.153 (colored)

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

Revision 1.153 / (download) - annotate - [select for diffs], Thu Sep 23 18:10:16 2010 UTC (13 years, 7 months ago) by nicm
Branch: MAIN
Changes since 1.152: +42 -1 lines
Diff to previous 1.152 (colored)

Add cvs_mkdir() for recursive directory creation on import, based on a
diff from Michael W Bombardieri in PR 6398.

tested by & ok jasper

Revision 1.152 / (download) - annotate - [select for diffs], Fri Jul 23 21:46:05 2010 UTC (13 years, 9 months ago) by ray
Branch: MAIN
CVS Tags: OPENBSD_4_8_BASE, OPENBSD_4_8
Changes since 1.151: +6 -6 lines
Diff to previous 1.151 (colored)

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

OK xsa zinovik

Revision 1.151 / (download) - annotate - [select for diffs], Tue Mar 24 06:59:19 2009 UTC (15 years, 1 month ago) by joris
Branch: MAIN
CVS Tags: OPENBSD_4_7_BASE, OPENBSD_4_7, OPENBSD_4_6_BASE, OPENBSD_4_6
Changes since 1.150: +3 -2 lines
Diff to previous 1.150 (colored)

use size_t for size, since atomicio() both accepts and returns it

Revision 1.150 / (download) - annotate - [select for diffs], Mon Feb 23 21:33:12 2009 UTC (15 years, 2 months ago) by joris
Branch: MAIN
CVS Tags: OPENBSD_4_5_BASE, OPENBSD_4_5
Changes since 1.149: +2 -3 lines
Diff to previous 1.149 (colored)

unused var

Revision 1.149 / (download) - annotate - [select for diffs], Mon Feb 23 21:32:08 2009 UTC (15 years, 2 months ago) by joris
Branch: MAIN
Changes since 1.148: +1 -9 lines
Diff to previous 1.148 (colored)

we no longer push out Set-sticky to the client when writing
our Tag file on the server or in cvs_mkpath(), this caused
problems for the "fast checkout" mechanism when a tag was supplied.

instead, write out any directory sticky tag when we are checking
out a file in that directory, this way we can use our "fast checkout"
mechanism (no /tmp required) even for -r and -d without breaking
working copies because they were missing CVS/Tag files.

"looks good" tobias@

Revision 1.148 / (download) - annotate - [select for diffs], Sat Feb 21 13:39:59 2009 UTC (15 years, 2 months ago) by joris
Branch: MAIN
Changes since 1.147: +2 -2 lines
Diff to previous 1.147 (colored)

in cvs_mkpath() always look for an existing CVS/Repository file
unless we're running checkout or export.
otherwise we'll end up accidently overwriting it in certain cases
on the client side of things.

Revision 1.147 / (download) - annotate - [select for diffs], Sat Jun 21 15:39:15 2008 UTC (15 years, 11 months ago) by joris
Branch: MAIN
CVS Tags: OPENBSD_4_4_BASE, OPENBSD_4_4
Changes since 1.146: +20 -1 lines
Diff to previous 1.146 (colored)

add a hash table mechanism based upon hcreate(3) but one that allows
us to maintain multiple hash tables concurrently.

immediatly start using it to keep track of what directories
we have already created and what CVS dirs we already created so
we do not recreate them when we do not need to.

we will be switching more internals to use this soon.
rejoice for cheaper lookups.

ok tobias@

Revision 1.146 / (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.145: +1 -2 lines
Diff to previous 1.145 (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.145 / (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.144: +5 -4 lines
Diff to previous 1.144 (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.144 / (download) - annotate - [select for diffs], Tue Jun 10 01:00:35 2008 UTC (15 years, 11 months ago) by joris
Branch: MAIN
Changes since 1.143: +44 -7 lines
Diff to previous 1.143 (colored)

New trigger framework that allows us to run the required scripts
defined in CVSROOT/commitinfo and CVSROOT/loginfo and so on.

This enables the use of log_accum2 and all that other nice stuff we like.

This was mostly written by Jonathan Armani with help from tobias@ and myself.

ok tobias@

Revision 1.143 / (download) - annotate - [select for diffs], Sun Mar 9 12:52:33 2008 UTC (16 years, 2 months ago) by joris
Branch: MAIN
Changes since 1.142: +4 -2 lines
Diff to previous 1.142 (colored)

be sure to build CVS/Root when updating and building directories (-d)

Revision 1.142 / (download) - annotate - [select for diffs], Sun Mar 9 01:58:00 2008 UTC (16 years, 2 months ago) by joris
Branch: MAIN
Changes since 1.141: +2 -2 lines
Diff to previous 1.141 (colored)

be sure to create CVS/Root if we added a new directory to the repository.

Revision 1.141 / (download) - annotate - [select for diffs], Sat Mar 8 22:15:30 2008 UTC (16 years, 2 months ago) by tobias
Branch: MAIN
Changes since 1.140: +18 -1 lines
Diff to previous 1.140 (colored)

CVS/Entries file must be created in cvs_mkadmin, because they have to be
available in empty directories too (containing only "D" then).

ok joris

Revision 1.140 / (download) - annotate - [select for diffs], Sat Mar 1 15:10:20 2008 UTC (16 years, 2 months ago) by joris
Branch: MAIN
CVS Tags: OPENBSD_4_3_BASE, OPENBSD_4_3
Changes since 1.139: +9 -6 lines
Diff to previous 1.139 (colored)

do not overwrite CVS/Root in an existing tree whenever somebody
specified a CVSROOT using alternate ways (-d or CVSROOT environ variable)

Revision 1.139 / (download) - annotate - [select for diffs], Sun Feb 10 14:04:40 2008 UTC (16 years, 3 months ago) by joris
Branch: MAIN
Changes since 1.138: +2 -1 lines
Diff to previous 1.138 (colored)

use cvs_validate_directory() in cvs_get_repository_path() as well,
since we want to make sure we have valid CVS/Repository content

ok tobias@

Revision 1.138 / (download) - annotate - [select for diffs], Sun Feb 10 14:00:42 2008 UTC (16 years, 3 months ago) by joris
Branch: MAIN
Changes since 1.137: +5 -1 lines
Diff to previous 1.137 (colored)

introduce cvs_validate_directory(), which is used to check
directory path to make sure they do not fall outside the CVSROOT
or the working copy directory in a remote setup

Revision 1.137 / (download) - annotate - [select for diffs], Sun Feb 10 13:01:08 2008 UTC (16 years, 3 months ago) by tobias
Branch: MAIN
Changes since 1.136: +2 -2 lines
Diff to previous 1.136 (colored)

Respond with "Updated" instead of "Checked-in" on server-side if a client
committed files, so keywords are expanded properly.

On client-side, we have to be careful about Directory ./ when it comes
to commits, so add a test for CVS_OP_COMMIT.

OK and help from joris@

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

- cvs_write_tagfile() is not responsible to remove CVS/Tag itself
- construct right CVS/Repository paths in cvs_mkpath()

fixes remote Issues;

Revision 1.135 / (download) - annotate - [select for diffs], Sat Feb 9 20:04:00 2008 UTC (16 years, 3 months ago) by xsa
Branch: MAIN
Changes since 1.134: +9 -3 lines
Diff to previous 1.134 (colored)

Introduce cvs_ent_line_str() - formats CVS/Entries lines.
OK tobias@.

Revision 1.134 / (download) - annotate - [select for diffs], Sat Feb 9 16:56:58 2008 UTC (16 years, 3 months ago) by joris
Branch: MAIN
Changes since 1.133: +1 -2 lines
Diff to previous 1.133 (colored)

unused var police, biatsh!

Revision 1.133 / (download) - annotate - [select for diffs], Sat Feb 9 16:52:27 2008 UTC (16 years, 3 months ago) by joris
Branch: MAIN
Changes since 1.132: +1 -10 lines
Diff to previous 1.132 (colored)

if the CVS/ directory already exists when we reach cvs_mkadmin()
we will definatly need to recreate it with the correct information.

otherwise sucessive checkouts of the same module with other arguments
(like -rOPENBSD_X_X or -D "3 years ago") will not store the correct
information.

Revision 1.132 / (download) - annotate - [select for diffs], Mon Feb 4 19:08:32 2008 UTC (16 years, 3 months ago) by joris
Branch: MAIN
Changes since 1.131: +20 -1 lines
Diff to previous 1.131 (colored)

more CVSROOT/modules stuff:

- support for -i flag:
	Run "prog" on "cvs commit" from top-level of module.
- fix some memory leaks in modules.c
- pass the line number from cvs_read_config() towards the callbacks
  so its easier to print out where it's going wrong, if it ever does.

OK tobias@

Revision 1.131 / (download) - annotate - [select for diffs], Mon Feb 4 18:23:58 2008 UTC (16 years, 3 months ago) by tobias
Branch: MAIN
Changes since 1.130: +6 -6 lines
Diff to previous 1.130 (colored)

Stripped off 'nb', which was (or was supposed to be) used to distinguish
between a named branch and a revision number supplied by -r.  This can
be done easier in cvs_write_tagfile directly.

OK joris@

Revision 1.130 / (download) - annotate - [select for diffs], Sun Feb 3 17:20:14 2008 UTC (16 years, 3 months ago) by joris
Branch: MAIN
Changes since 1.129: +13 -7 lines
Diff to previous 1.129 (colored)

better CVSROOT/module support, includes remote support and modules
that are not aliases (-a);

OK tobias@

Revision 1.129 / (download) - annotate - [select for diffs], Thu Jan 31 22:11:38 2008 UTC (16 years, 3 months ago) by joris
Branch: MAIN
Changes since 1.128: +4 -6 lines
Diff to previous 1.128 (colored)

free RCSNUM's when we are done with them;

ok tobias@

Revision 1.128 / (download) - annotate - [select for diffs], Thu Jan 31 22:09:05 2008 UTC (16 years, 3 months ago) by xsa
Branch: MAIN
Changes since 1.127: +2 -2 lines
Diff to previous 1.127 (colored)

Zap trailing whitespaces.

Revision 1.127 / (download) - annotate - [select for diffs], Thu Jan 31 16:44:46 2008 UTC (16 years, 3 months ago) by tobias
Branch: MAIN
Changes since 1.126: +30 -34 lines
Diff to previous 1.126 (colored)

Rework of cvs_get_repository_name.

checkout is allowed to continue if CVS/Repository does not exist.
export and import are not supposed to open CVS/Repository.
All other commands -- if CVS_USE_WDIR is set -- must fatal if it does
not exist.

OK joris@

Revision 1.126 / (download) - annotate - [select for diffs], Thu Jan 31 10:17:47 2008 UTC (16 years, 3 months ago) by tobias
Branch: MAIN
Changes since 1.125: +2 -2 lines
Diff to previous 1.125 (colored)

Our directory entries in CVS/Entries had one slash too much -- zapped.

OK xsa@

Revision 1.125 / (download) - annotate - [select for diffs], Mon Jan 21 16:36:46 2008 UTC (16 years, 4 months ago) by tobias
Branch: MAIN
Changes since 1.124: +6 -2 lines
Diff to previous 1.124 (colored)

Fixed export to be fully functional and compliant to GNU cvs in local and
remote setups.

OK xsa@

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

xmalloc + memset -> xcalloc

Revision 1.123 / (download) - annotate - [select for diffs], Thu Jan 10 10:08:22 2008 UTC (16 years, 4 months ago) by tobias
Branch: MAIN
Changes since 1.122: +3 -6 lines
Diff to previous 1.122 (colored)

another strcspn() round

Revision 1.122 / (download) - annotate - [select for diffs], Thu Jan 10 10:00:53 2008 UTC (16 years, 4 months ago) by tobias
Branch: MAIN
Changes since 1.121: +15 -3 lines
Diff to previous 1.121 (colored)

cvs_mkpath missed to add all "yet to be added" directories into CVS/Entries,
thus making further access to these subdirectories rather difficult.

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

cvs import must not parse files in local CVS directory.

OK niallo@

Revision 1.120 / (download) - annotate - [select for diffs], Fri Oct 5 19:28:23 2007 UTC (16 years, 7 months ago) by gilles
Branch: MAIN
Changes since 1.119: +2 -3 lines
Diff to previous 1.119 (colored)

strcspn() change

was okay'd by pyr@ and ok by millert@

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

better branching/sticky tag support, no branch commits yet though.

Revision 1.118 / (download) - annotate - [select for diffs], Wed Sep 19 12:04:38 2007 UTC (16 years, 8 months ago) by tobias
Branch: MAIN
Changes since 1.117: +8 -37 lines
Diff to previous 1.117 (colored)

Do not parse quoted strings because GNU cvs won't do so.

OK joris@

Revision 1.117 / (download) - annotate - [select for diffs], Wed Sep 19 11:53:27 2007 UTC (16 years, 8 months ago) by tobias
Branch: MAIN
Changes since 1.116: +4 -6 lines
Diff to previous 1.116 (colored)

Usage of fgetln() instead of fgets() in .cvsrc parsing handles line
numbers better and allows longer command arguments.

OK joris@

Revision 1.116 / (download) - annotate - [select for diffs], Sun Sep 9 20:24:06 2007 UTC (16 years, 8 months ago) by tobias
Branch: MAIN
Changes since 1.115: +11 -1 lines
Diff to previous 1.115 (colored)

Added support for checkout -p with local repository.

OK joris@

Revision 1.115 / (download) - annotate - [select for diffs], Tue Sep 4 19:07:04 2007 UTC (16 years, 8 months ago) by tobias
Branch: MAIN
Changes since 1.114: +1 -33 lines
Diff to previous 1.114 (colored)

Removed dead code.

OK joris@, ray@

Revision 1.114 / (download) - annotate - [select for diffs], Sun Sep 2 11:40:03 2007 UTC (16 years, 8 months ago) by tobias
Branch: MAIN
Changes since 1.113: +4 -1 lines
Diff to previous 1.113 (colored)

Handle quotation marks in .cvsrc correctly.

OK joris@

Revision 1.113 / (download) - annotate - [select for diffs], Thu Jul 19 06:34:15 2007 UTC (16 years, 10 months ago) by ray
Branch: MAIN
CVS Tags: OPENBSD_4_2_BASE, OPENBSD_4_2
Changes since 1.112: +2 -2 lines
Diff to previous 1.112 (colored)

xcalloc is unneeded here since i is always 0 and we always use the
memory after initializing it.

Initial diff from Igor Zinovik.

OK niallo and xsa.

Revision 1.112 / (download) - annotate - [select for diffs], Tue Jul 3 13:22:43 2007 UTC (16 years, 10 months ago) by joris
Branch: MAIN
Changes since 1.111: +9 -3 lines
Diff to previous 1.111 (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.111 / (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.110: +2 -4 lines
Diff to previous 1.110 (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.110 / (download) - annotate - [select for diffs], Sun May 27 00:37:46 2007 UTC (16 years, 11 months ago) by ray
Branch: MAIN
Changes since 1.109: +2 -2 lines
Diff to previous 1.109 (colored)

Fix off-by-one, from Tobias Stoeckmann.

OK niallo@

Revision 1.109 / (download) - annotate - [select for diffs], Wed May 9 21:19:28 2007 UTC (17 years ago) by xsa
Branch: MAIN
Changes since 1.108: +1 -40 lines
Diff to previous 1.108 (colored)

cvs_splitpath() isn't used anymore; from Tobias Stoeckmann.

Revision 1.108 / (download) - annotate - [select for diffs], Fri Apr 20 08:36:00 2007 UTC (17 years, 1 month ago) by xsa
Branch: MAIN
Changes since 1.107: +1 -25 lines
Diff to previous 1.107 (colored)

- correct signal handling and process waiting for the EDITOR support code
(From ray's code in sendbug(1))
- nuke cvs_exec() as it is not used anymore

Prompted by deraadt@ a few weeks ago.
OK ray@.

Revision 1.107 / (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.106: +9 -4 lines
Diff to previous 1.106 (colored)

general includes cleanup sweep. ok joris@ niallo@

Revision 1.106 / (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.105: +3 -3 lines
Diff to previous 1.105 (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.105 / (download) - annotate - [select for diffs], Sat Feb 17 18:23:43 2007 UTC (17 years, 3 months ago) by xsa
Branch: MAIN
Changes since 1.104: +10 -55 lines
Diff to previous 1.104 (colored)

cvs_path_cat() removal since we can now easily handle that
functionality w/ xsnprintf(); Initial diff started by thib@.
OK thib@ joris@.

Revision 1.104 / (download) - annotate - [select for diffs], Wed Feb 7 23:47:56 2007 UTC (17 years, 3 months ago) by todd
Branch: MAIN
Changes since 1.103: +2 -2 lines
Diff to previous 1.103 (colored)

fstat() -> lstat() in a few select cases,
this fixes a bug where opencvs update would abort if a link existed that
pointed to a non-existent file/dir
ok joris@

Revision 1.103 / (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.102: +1 -30 lines
Diff to previous 1.102 (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.102 / (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.101: +4 -1 lines
Diff to previous 1.101 (colored)

plug a memleak in keyword expansion.

ok joris@

Revision 1.101 / (download) - annotate - [select for diffs], Sat Jan 20 16:52:39 2007 UTC (17 years, 4 months ago) by thib
Branch: MAIN
Changes since 1.100: +3 -2 lines
Diff to previous 1.100 (colored)

Add missing check for fgets return value in
cvs_get_repository_name().

OK joris@

Revision 1.100 / (download) - annotate - [select for diffs], Sat Jan 20 01:07:51 2007 UTC (17 years, 4 months ago) by niallo
Branch: MAIN
Changes since 1.99: +5 -3 lines
Diff to previous 1.99 (colored)

sweep opencvs for missing rcs_translate_tag() return checks.

Revision 1.99 / (download) - annotate - [select for diffs], Fri Jan 19 23:55:31 2007 UTC (17 years, 4 months ago) by todd
Branch: MAIN
Changes since 1.98: +41 -5 lines
Diff to previous 1.98 (colored)

another place to check for DT_UNKNOWN for d_type for afs/nfs

Revision 1.98 / (download) - annotate - [select for diffs], Wed Jan 17 17:54:50 2007 UTC (17 years, 4 months ago) by joris
Branch: MAIN
Changes since 1.97: +7 -4 lines
Diff to previous 1.97 (colored)

add support for remote checkout in both our client and server,
with this the last real dependency to actually be able to use opencvs
in a remote setup has been added.

based upon an initial diff from xsa@
'kay niallo@

Revision 1.97 / (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.96: +25 -30 lines
Diff to previous 1.96 (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.96 / (download) - annotate - [select for diffs], Sun Jan 7 01:53:12 2007 UTC (17 years, 4 months ago) by joris
Branch: MAIN
Changes since 1.95: +2 -2 lines
Diff to previous 1.95 (colored)

zap-o-matic 2007:
- zap unused argument to cvs_exec()

Revision 1.95 / (download) - annotate - [select for diffs], Wed Jan 3 14:08:09 2007 UTC (17 years, 4 months ago) by xsa
Branch: MAIN
Changes since 1.94: +20 -1 lines
Diff to previous 1.94 (colored)

bring back cvs_yesno() as is it going to be used pretty soon now.

Revision 1.94 / (download) - annotate - [select for diffs], Tue Dec 5 15:59:48 2006 UTC (17 years, 5 months ago) by xsa
Branch: MAIN
Changes since 1.93: +2 -2 lines
Diff to previous 1.93 (colored)

unlink(2) sets errno, use it for error message.

Revision 1.93 / (download) - annotate - [select for diffs], Tue Dec 5 11:01:05 2006 UTC (17 years, 5 months ago) by xsa
Branch: MAIN
Changes since 1.92: +2 -2 lines
Diff to previous 1.92 (colored)

rmdir(2) sets errno, use it for error message.

Revision 1.92 / (download) - annotate - [select for diffs], Tue Nov 28 14:49:58 2006 UTC (17 years, 5 months ago) by xsa
Branch: MAIN
Changes since 1.91: +6 -9 lines
Diff to previous 1.91 (colored)

snprintf() -> cvs_path_cat()

Revision 1.91 / (download) - annotate - [select for diffs], Wed Oct 11 22:00:22 2006 UTC (17 years, 7 months ago) by thib
Branch: MAIN
Changes since 1.90: +5 -4 lines
Diff to previous 1.90 (colored)

check fgets(3) return value and also fix a
buf[strlen(buf) - 1] = something; misuse.

ok niallo@, cloder@

Revision 1.90 / (download) - annotate - [select for diffs], Sun Jul 9 01:47:20 2006 UTC (17 years, 10 months ago) by joris
Branch: MAIN
CVS Tags: OPENBSD_4_0_BASE, OPENBSD_4_0
Changes since 1.89: +14 -8 lines
Diff to previous 1.89 (colored)

more straightforward trace (-t) output, too much is just too noisy.

Revision 1.89 / (download) - annotate - [select for diffs], Fri Jul 7 17:37:17 2006 UTC (17 years, 10 months ago) by joris
Branch: MAIN
Changes since 1.88: +3 -5 lines
Diff to previous 1.88 (colored)

first part of opencvs remote, fairly useable on existing trees
although i advise against using it on real development trees for now.

only a few commands work right so far:
- commit
- diff
- status
- log
- update (partially working)

if you feel like testing remote and run into bugs feel free to
contact me, and please include a full trace (-t).

Revision 1.88 / (download) - annotate - [select for diffs], Wed Jun 14 20:28:53 2006 UTC (17 years, 11 months ago) by joris
Branch: MAIN
Changes since 1.87: +3 -3 lines
Diff to previous 1.87 (colored)

simplify cvs_hack_time() and the way it is called;

Revision 1.87 / (download) - annotate - [select for diffs], Wed Jun 14 15:14:47 2006 UTC (17 years, 11 months ago) by xsa
Branch: MAIN
Changes since 1.86: +10 -4 lines
Diff to previous 1.86 (colored)

handle existing CVS/Tag file when adding new directories. OK joris@.

Revision 1.86 / (download) - annotate - [select for diffs], Wed Jun 7 22:20:59 2006 UTC (17 years, 11 months ago) by reyk
Branch: MAIN
Changes since 1.85: +1 -5 lines
Diff to previous 1.85 (colored)

a bug in cvs_mkpath() prevented to create the CVS admin directory and
files under some special circumstances. remove a bogus stat() check to
fix it.

ok joris@

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

make sure cvs_get_repository_path returns a valid repo name
for the import command.

Revision 1.84 / (download) - annotate - [select for diffs], Tue May 30 07:00:30 2006 UTC (17 years, 11 months ago) by joris
Branch: MAIN
Changes since 1.83: +11 -2 lines
Diff to previous 1.83 (colored)

hello import, only works for non-existing repositories right now,
but work is in progress for importing stuff into existing repositories.

Revision 1.83 / (download) - annotate - [select for diffs], Mon May 29 07:16:44 2006 UTC (17 years, 11 months ago) by joris
Branch: MAIN
Changes since 1.82: +3 -5 lines
Diff to previous 1.82 (colored)

make the log command use rcs_translate_tag

Revision 1.82 / (download) - annotate - [select for diffs], Sun May 28 21:34:37 2006 UTC (17 years, 11 months ago) by joris
Branch: MAIN
Changes since 1.81: +71 -1 lines
Diff to previous 1.81 (colored)

add code which allows us to select revisions based upon
a string given by the user on the command line, much like
rcs_revision_select in OpenRCS.

this will be usefull for some commands.

Revision 1.81 / (download) - annotate - [select for diffs], Sun May 28 17:25:18 2006 UTC (17 years, 11 months ago) by joris
Branch: MAIN
Changes since 1.80: +21 -13 lines
Diff to previous 1.80 (colored)

several fixes to the file api:
- default to CVS_FILE when something is totally unknown
- cvs_get_repository_path() now returns the full repository path for
  the given argument.
- cvs_get_repository_name() returns the contents of CVS/Repository
  to the caller.
- allow command callbacks to specify if our recursion code needs
  to skip the directory or not.
- when checking for a admin directory, make sure it is in fact
  a directory. if it is not we dont want to recurse inside.

Revision 1.80 / (download) - annotate - [select for diffs], Sat May 27 16:18:23 2006 UTC (17 years, 11 months ago) by joris
Branch: MAIN
Changes since 1.79: +1 -26 lines
Diff to previous 1.79 (colored)

boogie cvs_yesno() down the removal hatch, it is not used.

Revision 1.79 / (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.78: +139 -365 lines
Diff to previous 1.78 (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.78 / (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.77: +17 -17 lines
Diff to previous 1.77 (colored)

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

Revision 1.77 / (download) - annotate - [select for diffs], Wed Apr 5 01:38:56 2006 UTC (18 years, 1 month ago) by ray
Branch: MAIN
Changes since 1.76: +9 -12 lines
Diff to previous 1.76 (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.76 / (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.75: +2 -2 lines
Diff to previous 1.75 (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.75 / (download) - annotate - [select for diffs], Tue Mar 28 07:17:17 2006 UTC (18 years, 1 month ago) by ray
Branch: MAIN
Changes since 1.74: +1 -1 lines
Diff to previous 1.74 (colored)

xmalloc(num * size) -> xcalloc(num, size)
asprintf -> xasprintf
Remove asprintf check, which was non-portable anyway.

``okidoki'' xsa@

Revision 1.74 / (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.73: +2 -2 lines
Diff to previous 1.73 (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.73 / (download) - annotate - [select for diffs], Mon Mar 27 06:13:51 2006 UTC (18 years, 1 month ago) by pat
Branch: MAIN
Changes since 1.72: +26 -9 lines
Diff to previous 1.72 (colored)

Plug a memory leak for all cvs_strsplit call sites; ok xsa@

Revision 1.72 / (download) - annotate - [select for diffs], Fri Mar 17 13:40:41 2006 UTC (18 years, 2 months ago) by niallo
Branch: MAIN
Changes since 1.71: +30 -30 lines
Diff to previous 1.71 (colored)

- Lint says cvs_hacktime() is not used in rcs, so move it into !RCSPROG.

ok xsa@

Revision 1.71 / (download) - annotate - [select for diffs], Fri Mar 17 08:51:45 2006 UTC (18 years, 2 months ago) by xsa
Branch: MAIN
Changes since 1.70: +28 -1 lines
Diff to previous 1.70 (colored)

rlog_strsplit() -> cvs_strsplit() and move it to util.c so it can be reused
by `cvs log' and some other RCS utilities. "Looks good" ray@.

Revision 1.70 / (download) - annotate - [select for diffs], Wed Mar 15 19:59:36 2006 UTC (18 years, 2 months ago) by niallo
Branch: MAIN
Changes since 1.69: +28 -2 lines
Diff to previous 1.69 (colored)

- add util.h, reorganising a bunch of things and exposing cvs_yesno()
function to be used by rcs.

Revision 1.69 / (download) - annotate - [select for diffs], Fri Jan 27 12:56:28 2006 UTC (18 years, 3 months ago) by xsa
Branch: MAIN
CVS Tags: OPENBSD_3_9_BASE, OPENBSD_3_9
Changes since 1.68: +2 -5 lines
Diff to previous 1.68 (colored)

cvs_mkadmin() cannot return < 0 anymore;

Revision 1.68 / (download) - annotate - [select for diffs], Wed Jan 25 11:19:51 2006 UTC (18 years, 3 months ago) by xsa
Branch: MAIN
Changes since 1.67: +26 -31 lines
Diff to previous 1.67 (colored)

strings cleanup; OK niallo@.

Revision 1.67 / (download) - annotate - [select for diffs], Mon Jan 2 08:23:39 2006 UTC (18 years, 4 months ago) by xsa
Branch: MAIN
Changes since 1.66: +7 -7 lines
Diff to previous 1.66 (colored)

rename variable to fix shadow warning;

Revision 1.66 / (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.65: +2 -12 lines
Diff to previous 1.65 (colored)

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

Revision 1.65 / (download) - annotate - [select for diffs], Sun Jan 1 05:05:58 2006 UTC (18 years, 4 months ago) by joris
Branch: MAIN
Changes since 1.64: +59 -30 lines
Diff to previous 1.64 (colored)

more code cleanup;
ok xsa@

i'm commiting only hours after newyear,
ah the joys of being a true geek.

Revision 1.64 / (download) - annotate - [select for diffs], Fri Dec 30 16:47:36 2005 UTC (18 years, 4 months ago) by joris
Branch: MAIN
Changes since 1.63: +7 -8 lines
Diff to previous 1.63 (colored)

more code cleanup, ok niallo@ and xsa@

Revision 1.63 / (download) - annotate - [select for diffs], Sat Dec 24 19:07:52 2005 UTC (18 years, 4 months ago) by xsa
Branch: MAIN
Changes since 1.62: +10 -6 lines
Diff to previous 1.62 (colored)

add an argument to cvs_chdir() which enables or not the removal
of the directory we just chdir'd to.
Useful when the function fails especially for the server mode and
its temporary directory. This way it's not left behind on exit.
ok joris@.

Revision 1.62 / (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.61: +2 -7 lines
Diff to previous 1.61 (colored)

remove useless cvs_buf_alloc() failure checks;

Revision 1.61 / (download) - annotate - [select for diffs], Thu Dec 22 14:31:44 2005 UTC (18 years, 5 months ago) by xsa
Branch: MAIN
Changes since 1.60: +3 -6 lines
Diff to previous 1.60 (colored)

cvs_chdir() cannot fail anymore;

Revision 1.60 / (download) - annotate - [select for diffs], Thu Dec 22 14:16:18 2005 UTC (18 years, 5 months ago) by xsa
Branch: MAIN
Changes since 1.59: +30 -53 lines
Diff to previous 1.59 (colored)

another fatal() round;

Revision 1.59 / (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.58: +19 -48 lines
Diff to previous 1.58 (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.58 / (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.57: +30 -1 lines
Diff to previous 1.57 (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.57 / (download) - annotate - [select for diffs], Sat Dec 3 03:59:47 2005 UTC (18 years, 5 months ago) by joris
Branch: MAIN
Changes since 1.56: +1 -3 lines
Diff to previous 1.56 (colored)

nuke unused vars;

Revision 1.56 / (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.55: +21 -10 lines
Diff to previous 1.55 (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.55 / (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.54: +3 -3 lines
Diff to previous 1.54 (colored)

nuke trailing whitespaces;

Revision 1.54 / (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.53: +113 -1 lines
Diff to previous 1.53 (colored)

diff3 support, needed for merging files together;

"go for it" niallo@

Revision 1.53 / (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.52: +2 -2 lines
Diff to previous 1.52 (colored)

knf and spacing, ok joris@

Revision 1.52 / (download) - annotate - [select for diffs], Thu Sep 15 17:01:10 2005 UTC (18 years, 8 months ago) by xsa
Branch: MAIN
Changes since 1.51: +10 -3 lines
Diff to previous 1.51 (colored)

check in cvs_mkadmin() wether we need to create or not the
CVS/Tag file. Sync the rest of the code accordingly; OK joris@.

Revision 1.51 / (download) - annotate - [select for diffs], Mon Sep 5 19:29:42 2005 UTC (18 years, 8 months ago) by xsa
Branch: MAIN
Changes since 1.50: +120 -2 lines
Diff to previous 1.50 (colored)

add new functions: cvs_write_tagfile() and cvs_parse_tagfile(),
write and parse a CVS/Tag file. Ok joris@.

Revision 1.50 / (download) - annotate - [select for diffs], Wed Aug 17 08:35:53 2005 UTC (18 years, 9 months ago) by xsa
Branch: MAIN
CVS Tags: OPENBSD_3_8_BASE, OPENBSD_3_8
Changes since 1.49: +2 -2 lines
Diff to previous 1.49 (colored)

trailing whitespaces ...

Revision 1.49 / (download) - annotate - [select for diffs], Fri Aug 12 14:41:54 2005 UTC (18 years, 9 months ago) by xsa
Branch: MAIN
Changes since 1.48: +23 -1 lines
Diff to previous 1.48 (colored)

add cvs_rename() function; ok jfb

Revision 1.48 / (download) - annotate - [select for diffs], Sat Jul 30 21:16:17 2005 UTC (18 years, 9 months ago) by moritz
Branch: MAIN
Changes since 1.47: +3 -2 lines
Diff to previous 1.47 (colored)

o remove a call to cvs_ent_open() from cvs_file_create(),
  since cvs_mkadmin() already does this for us.
o don't deref NULL ptr when cvs_ent_open() fails.
o fix format string in cvs_log().

ok joris@

Revision 1.47 / (download) - annotate - [select for diffs], Wed Jul 27 19:24:14 2005 UTC (18 years, 9 months ago) by xsa
Branch: MAIN
Changes since 1.46: +3 -3 lines
Diff to previous 1.46 (colored)

check == -1 not != 0 for stat() return value, for consistency sake!
"OK big time" jfb@.

Revision 1.46 / (download) - annotate - [select for diffs], Wed Jul 27 10:38:01 2005 UTC (18 years, 9 months ago) by xsa
Branch: MAIN
Changes since 1.45: +6 -1 lines
Diff to previous 1.45 (colored)

make cvs_rmdir() handle global -n and -t options; ok joris@.

Revision 1.45 / (download) - annotate - [select for diffs], Wed Jul 27 10:36:14 2005 UTC (18 years, 9 months ago) by xsa
Branch: MAIN
Changes since 1.44: +4 -4 lines
Diff to previous 1.44 (colored)

rename cvs_remove_dir() to cvs_rmdir() because it might be confusing
with the `remove' command local functions. ok joris@.

Revision 1.44 / (download) - annotate - [select for diffs], Tue Jul 26 14:46:24 2005 UTC (18 years, 9 months ago) by joris
Branch: MAIN
Changes since 1.43: +2 -2 lines
Diff to previous 1.43 (colored)

no need to complain that we cannot remove the file in cvs_unlink()
if it does not exist.

"commit it" xsa@

Revision 1.43 / (download) - annotate - [select for diffs], Mon Jul 25 13:37:53 2005 UTC (18 years, 9 months ago) by xsa
Branch: MAIN
Changes since 1.42: +3 -3 lines
Diff to previous 1.42 (colored)

minor KNF;

Revision 1.42 / (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.41: +3 -3 lines
Diff to previous 1.41 (colored)

KNF;

Revision 1.41 / (download) - annotate - [select for diffs], Sun Jul 24 17:33:09 2005 UTC (18 years, 9 months ago) by xsa
Branch: MAIN
Changes since 1.40: +2 -4 lines
Diff to previous 1.40 (colored)

use cvs_unlink() here too;

Revision 1.40 / (download) - annotate - [select for diffs], Sun Jul 24 17:12:25 2005 UTC (18 years, 9 months ago) by xsa
Branch: MAIN
Changes since 1.39: +24 -1 lines
Diff to previous 1.39 (colored)

add cvs_unlink(); a wrapper to unlunk() w/ an error msg as it is used in
many places. Also handle -n and -t global options.
ok joris@ jfb@.

Revision 1.39 / (download) - annotate - [select for diffs], Sat Jul 23 10:59:47 2005 UTC (18 years, 10 months ago) by xsa
Branch: MAIN
Changes since 1.38: +2 -4 lines
Diff to previous 1.38 (colored)

use cvs_chdir();

Revision 1.38 / (download) - annotate - [select for diffs], Sat Jul 23 10:49:35 2005 UTC (18 years, 10 months ago) by xsa
Branch: MAIN
Changes since 1.37: +19 -1 lines
Diff to previous 1.37 (colored)

add cvs_chdir(); a wrapper to chdir() w/ an error msg as it is used in
many places. Let's make our life simpler for once.
ok jfb@ joris@.

Revision 1.37 / (download) - annotate - [select for diffs], Tue Jul 19 15:36:54 2005 UTC (18 years, 10 months ago) by xsa
Branch: MAIN
Changes since 1.36: +11 -24 lines
Diff to previous 1.36 (colored)

use cvs_path_cat() where appropriate; ok joris@.

Revision 1.36 / (download) - annotate - [select for diffs], Tue Jul 19 01:40:29 2005 UTC (18 years, 10 months ago) by deraadt
Branch: MAIN
Changes since 1.35: +2 -2 lines
Diff to previous 1.35 (colored)

spacing

Revision 1.35 / (download) - annotate - [select for diffs], Wed Jul 13 16:20:44 2005 UTC (18 years, 10 months ago) by xsa
Branch: MAIN
Changes since 1.34: +30 -1 lines
Diff to previous 1.34 (colored)

add cvs_rcs_getpath() function. Returns the path of the RCS file if it
does exist. Will save us code duplication.
ok joris@ jfb@.

Revision 1.34 / (download) - annotate - [select for diffs], Fri Jun 17 15:09:55 2005 UTC (18 years, 11 months ago) by joris
Branch: MAIN
Changes since 1.33: +116 -1 lines
Diff to previous 1.33 (colored)



correctly build a temporary copy of the client its repository
localy, so the server can execute the local commands on it
and pipe the output to the client.

with this diff in, our server is now working, please note
that we currently don't have support for all commands yet,
but you can expect this soon.

ok xsa@

Revision 1.33 / (download) - annotate - [select for diffs], Tue Jun 14 03:56:14 2005 UTC (18 years, 11 months ago) by pat
Branch: MAIN
Changes since 1.32: +12 -13 lines
Diff to previous 1.32 (colored)

missing closedir() on error path; ok joris xsa

Revision 1.32 / (download) - annotate - [select for diffs], Thu Jun 2 20:19:30 2005 UTC (18 years, 11 months ago) by joris
Branch: MAIN
Changes since 1.31: +1 -3 lines
Diff to previous 1.31 (colored)



remove unneeded error reporting when using cvs_path_cat(), the
function does it for us.

OK jfb@

Revision 1.31 / (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.30: +3 -4 lines
Diff to previous 1.30 (colored)

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

Revision 1.30 / (download) - annotate - [select for diffs], Fri May 27 17:04:59 2005 UTC (18 years, 11 months ago) by jfb
Branch: MAIN
Changes since 1.29: +36 -19 lines
Diff to previous 1.29 (colored)

- check strlcpy() return values for truncation
- in cvs_remove_dir(), return failure if we fail to unlink the
  base directory, and return -1 on error to respect the general
  util convention
- missing function documentation

Revision 1.29 / (download) - annotate - [select for diffs], Thu May 26 22:25:31 2005 UTC (18 years, 11 months ago) by jfb
Branch: MAIN
Changes since 1.28: +22 -1 lines
Diff to previous 1.28 (colored)

don't keep a pointer to the file handle in CVSENTRIES, it is only
used in cvs_ent_write(), and simplify path building a bit

Revision 1.28 / (download) - annotate - [select for diffs], Tue May 24 20:04:43 2005 UTC (18 years, 11 months ago) by joris
Branch: MAIN
Changes since 1.27: +10 -28 lines
Diff to previous 1.27 (colored)



- simplify cvs_mkadmin().
- create the correct base paths in checkout.
- remove the CVS_CMD_SENDARGS2 flag for checkout, it doesn't need it.

okay jfb@

Revision 1.27 / (download) - annotate - [select for diffs], Fri May 20 10:40:22 2005 UTC (19 years ago) by pat
Branch: MAIN
Changes since 1.26: +7 -4 lines
Diff to previous 1.26 (colored)

* proper memset
* plug potential memory leak
ok jfb

Revision 1.26 / (download) - annotate - [select for diffs], Fri May 20 00:07:19 2005 UTC (19 years ago) by joris
Branch: MAIN
Changes since 1.25: +1 -7 lines
Diff to previous 1.25 (colored)



unused var

ok jfb@

Revision 1.25 / (download) - annotate - [select for diffs], Thu May 19 04:17:24 2005 UTC (19 years ago) by jfb
Branch: MAIN
Changes since 1.24: +1 -75 lines
Diff to previous 1.24 (colored)

use the date parsing code from date.y and fix timestamps on newly
created files so they match the values found in the corresponding
entries, otherwise all files appear as modified

ok joris

Revision 1.24 / (download) - annotate - [select for diffs], Wed May 18 20:24:19 2005 UTC (19 years ago) by joris
Branch: MAIN
Changes since 1.23: +51 -1 lines
Diff to previous 1.23 (colored)



build a local copy of the client's source tree when acting as a server.
more server stuff coming soon!

ok jfb@, xsa@

Revision 1.23 / (download) - annotate - [select for diffs], Mon Apr 18 21:02:50 2005 UTC (19 years, 1 month ago) by jfb
Branch: MAIN
Changes since 1.22: +4 -4 lines
Diff to previous 1.22 (colored)

Modify the CVSFILE structure using a union to keep information about
both files and directories.  We can now keep the revision number for
regular files, and don't need to fetch the appropriate entry in the
command callbacks.  This saves a huge amount of parsing on Entries
files.

ok joris@

Revision 1.22 / (download) - annotate - [select for diffs], Sat Apr 16 20:05:05 2005 UTC (19 years, 1 month ago) by xsa
Branch: MAIN
Changes since 1.21: +2 -2 lines
Diff to previous 1.21 (colored)

more snprintf return value check; joris ok

Revision 1.21 / (download) - annotate - [select for diffs], Sat Apr 16 18:07:35 2005 UTC (19 years, 1 month ago) by xsa
Branch: MAIN
Changes since 1.20: +31 -6 lines
Diff to previous 1.20 (colored)

snprintf return value check; joris ok

Revision 1.20 / (download) - annotate - [select for diffs], Wed Dec 22 00:38:26 2004 UTC (19 years, 5 months ago) by david
Branch: MAIN
CVS Tags: OPENBSD_3_7_BASE, OPENBSD_3_7
Changes since 1.19: +3 -3 lines
Diff to previous 1.19 (colored)

spelling corrections; ok jmc@

Revision 1.19 / (download) - annotate - [select for diffs], Mon Dec 13 16:59:50 2004 UTC (19 years, 5 months ago) by jfb
Branch: MAIN
Changes since 1.18: +2 -2 lines
Diff to previous 1.18 (colored)

if we fail to generate a file's checksum, print the path of the file
as part of the error message

Revision 1.18 / (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.17: +2 -13 lines
Diff to previous 1.17 (colored)

less whitespace, more pretty.  ok jfb

Revision 1.17 / (download) - annotate - [select for diffs], Tue Dec 7 06:33:11 2004 UTC (19 years, 5 months ago) by jfb
Branch: MAIN
Changes since 1.16: +34 -1 lines
Diff to previous 1.16 (colored)

add missing parts for support of .cvsrc

tested, tweaked by and ok djm@

Revision 1.16 / (download) - annotate - [select for diffs], Mon Dec 6 21:13:49 2004 UTC (19 years, 5 months ago) by jfb
Branch: MAIN
Changes since 1.15: +11 -4 lines
Diff to previous 1.15 (colored)

reorder some of the code for argument vector splitting so we don't
overflow the array and we don't produce weird results if the last
character of the line is an escape character (bogus!)

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

tighten vertical spacing for else; jfb ok

Revision 1.14 / (download) - annotate - [select for diffs], Fri Dec 3 20:24:37 2004 UTC (19 years, 5 months ago) by weingart
Branch: MAIN
Changes since 1.13: +3 -1 lines
Diff to previous 1.13 (colored)

Handle files mode 750.

Revision 1.13 / (download) - annotate - [select for diffs], Fri Nov 26 16:23:50 2004 UTC (19 years, 5 months ago) by jfb
Branch: MAIN
Changes since 1.12: +11 -9 lines
Diff to previous 1.12 (colored)

Rewrite the internals of the file management code so that we do not keep
a full path to each file we load, and cache file names so we can have
multiple references to a single name.  This saves a lot of memory on large
trees such as /usr/src, especially on 'Makefile', 'README' and such.

Revision 1.12 / (download) - annotate - [select for diffs], Wed Nov 10 22:27:31 2004 UTC (19 years, 6 months ago) by krapht
Branch: MAIN
Changes since 1.11: +2 -0 lines
Diff to previous 1.11 (colored)

missing headers

Revision 1.11 / (download) - annotate - [select for diffs], Tue Nov 9 21:08:05 2004 UTC (19 years, 6 months ago) by krapht
Branch: MAIN
Changes since 1.10: +27 -0 lines
Diff to previous 1.10 (colored)

cvs_exec()

Revision 1.10 / (download) - annotate - [select for diffs], Fri Aug 13 12:48:51 2004 UTC (19 years, 9 months ago) by jfb
Branch: MAIN
Changes since 1.9: +43 -28 lines
Diff to previous 1.9 (colored)

Handle RFC822 and ctime(3) style timestamps

Revision 1.9 / (download) - annotate - [select for diffs], Fri Aug 13 02:16:29 2004 UTC (19 years, 9 months ago) by jfb
Branch: MAIN
Changes since 1.8: +80 -12 lines
Diff to previous 1.8 (colored)

Add cvs_datesec() to calculate the time_t value corresponding to a
ctime(3)-style date string

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

Before stating the Root file, make sure we actually have something to
write in it

Revision 1.7 / (download) - annotate - [select for diffs], Fri Aug 6 20:08:49 2004 UTC (19 years, 9 months ago) by jfb
Branch: MAIN
Changes since 1.6: +18 -35 lines
Diff to previous 1.6 (colored)

Simplify cvs_splitpath() by requiring only one buffer to copy the result
into

Revision 1.6 / (download) - annotate - [select for diffs], Thu Aug 5 13:50:12 2004 UTC (19 years, 9 months ago) by jfb
Branch: MAIN
Changes since 1.5: +4 -0 lines
Diff to previous 1.5 (colored)

When splitting a path, strip the trailing slashes before splitting it,
otherwise a path with a trailing slash would give an empty file name
and the original path as the base part

Revision 1.5 / (download) - annotate - [select for diffs], Fri Jul 30 16:52:13 2004 UTC (19 years, 9 months ago) by jfb
Branch: MAIN
Changes since 1.4: +35 -30 lines
Diff to previous 1.4 (colored)

When calling cvs_mkadmin(), only create the files if they don't already
exist

Revision 1.4 / (download) - annotate - [select for diffs], Fri Jul 30 01:49:24 2004 UTC (19 years, 9 months ago) by jfb
Branch: MAIN
Changes since 1.3: +1 -1 lines
Diff to previous 1.3 (colored)

Move to the new API for the client-server protocol.  All functions now
take a cvs root structure as parameter.  This will allow for much easier
management of CVS trees that make use of multiple roots.

Revision 1.3 / (download) - annotate - [select for diffs], Wed Jul 28 01:50:05 2004 UTC (19 years, 9 months ago) by jfb
Branch: MAIN
Changes since 1.2: +2 -2 lines
Diff to previous 1.2 (colored)

Add a newline at the end of the strings put in CVS/Root and
CVS/Repository, like GNU CVS does

Revision 1.2 / (download) - annotate - [select for diffs], Tue Jul 27 12:01:58 2004 UTC (19 years, 9 months ago) by jfb
Branch: MAIN
Changes since 1.1: +69 -5 lines
Diff to previous 1.1 (colored)

* create cvs_file_alloc() to keep one copy of the file allocation code
  and reuse it
* add cvs_file_create() to explicitly create a file or directory
* add cvs_mkadmin() to fill the administrative files for a CVS directory

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

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.