OpenBSD CVS

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


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

Request diff between arbitrary revisions


Default branch: MAIN


Revision 1.26 / (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.25: +2 -2 lines
Diff to previous 1.25 (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.25 / (download) - annotate - [select for diffs], Wed May 31 16:18:20 2017 UTC (6 years, 11 months ago) by joris
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.24: +3 -3 lines
Diff to previous 1.24 (colored)

When unlocking a directory only unlock the given one rather then all repo_locks.

Revision 1.24 / (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_6_1_BASE, OPENBSD_6_1, OPENBSD_6_0_BASE, OPENBSD_6_0, OPENBSD_5_9_BASE, OPENBSD_5_9, OPENBSD_5_8_BASE, OPENBSD_5_8, OPENBSD_5_7_BASE, OPENBSD_5_7
Changes since 1.23: +6 -6 lines
Diff to previous 1.23 (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.23 / (download) - annotate - [select for diffs], Fri Jul 23 08:31:19 2010 UTC (13 years, 9 months ago) by ray
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, OPENBSD_4_9_BASE, OPENBSD_4_9, OPENBSD_4_8_BASE, OPENBSD_4_8
Changes since 1.22: +4 -4 lines
Diff to previous 1.22 (colored)

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

"yes!" nicm

Revision 1.22 / (download) - annotate - [select for diffs], Thu Mar 26 22:54:37 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.21: +7 -5 lines
Diff to previous 1.21 (colored)

fix the way Attic is handled in our recursion code, so we
do not skip files or run over them twice.

also fixes -l and -r for checkout/update when a file in
Attic exists with that tag that in HEAD is a directory
in the normal repository like gnu/usr.bin/gcc/INSTALL.

as a bonus, we do not run fstat() twice per file or dir
anymore...

spotted by deraadt@

Revision 1.21 / (download) - annotate - [select for diffs], Sat Feb 21 13:44:18 2009 UTC (15 years, 2 months ago) by joris
Branch: MAIN
CVS Tags: OPENBSD_4_5_BASE, OPENBSD_4_5
Changes since 1.20: +11 -7 lines
Diff to previous 1.20 (colored)

use file_flags for 2 more reasons:
- mark a file as being inside the Attic/
- mark a file as existing in the working copy
  (both in local and remote mode)

this way we no longer will need to check if cf->fd == -1 and
think about wether or not we are in local or remote mode.

Revision 1.20 / (download) - annotate - [select for diffs], Sun Mar 9 03:14:52 2008 UTC (16 years, 2 months ago) by joris
Branch: MAIN
CVS Tags: OPENBSD_4_4_BASE, OPENBSD_4_4
Changes since 1.19: +12 -3 lines
Diff to previous 1.19 (colored)

proper repository locking:
- all read operations now look for a lock, and wait if present but never
  try to lock the tree themselfs anymore.
- all write operations lock the tree where needed.
- commit locks all relevant directories before even attempting to start.

Revision 1.19 / (download) - annotate - [select for diffs], Sun Feb 3 23:34:41 2008 UTC (16 years, 3 months ago) by joris
Branch: MAIN
CVS Tags: OPENBSD_4_3_BASE, OPENBSD_4_3
Changes since 1.18: +5 -1 lines
Diff to previous 1.18 (colored)

shuffle some stuff around so we dont end up doing the same things
twice in cvs_module_lookup() and checkout_check_directory();

allow single files to be ignored with ! as well;

Revision 1.18 / (download) - annotate - [select for diffs], Sun Feb 3 22:50:28 2008 UTC (16 years, 3 months ago) by joris
Branch: MAIN
Changes since 1.17: +6 -1 lines
Diff to previous 1.17 (colored)

more CVSROOT/module stuff:

- allow more then 1 module to be specified per definition
- respect the "!" sign which means: "hey ignore this dir when checking out"
- non alias definitions can now contain files

ok tobias@

Revision 1.17 / (download) - annotate - [select for diffs], Thu Jan 31 13:54:12 2008 UTC (16 years, 3 months ago) by tobias
Branch: MAIN
Changes since 1.16: +5 -3 lines
Diff to previous 1.16 (colored)

On repository-side, only parse files which end with ,v (RCS_FILE_EXT).
File name ",v" is ignored, too -- in opposite to weird GNU cvs that tries
to create a file without name.

OK joris@

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

Don't ignore files and directories due to patterns on repository-side,
these patterns should only be applied on working directories.

This finally enables a fully working "cvs checkout src" (but don't expect
all checkout options to work, too).

Revision 1.15 / (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.14: +3 -3 lines
Diff to previous 1.14 (colored)

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

Revision 1.14 / (download) - annotate - [select for diffs], Tue Jul 3 13:22:43 2007 UTC (16 years, 10 months ago) by joris
Branch: MAIN
CVS Tags: OPENBSD_4_2_BASE, OPENBSD_4_2
Changes since 1.13: +5 -2 lines
Diff to previous 1.13 (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.13 / (download) - annotate - [select for diffs], Fri Jun 1 17:47:47 2007 UTC (16 years, 11 months ago) by niallo
Branch: MAIN
Changes since 1.12: +1 -2 lines
Diff to previous 1.12 (colored)

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

ok joris@ xsa@ ray@

Revision 1.12 / (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.11: +8 -6 lines
Diff to previous 1.11 (colored)

general includes cleanup sweep. ok joris@ niallo@

Revision 1.11 / (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.10: +5 -12 lines
Diff to previous 1.10 (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.10 / (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.9: +3 -3 lines
Diff to previous 1.9 (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.9 / (download) - annotate - [select for diffs], Thu Jan 25 18:56:33 2007 UTC (17 years, 3 months ago) by otto
Branch: MAIN
Changes since 1.8: +2 -8 lines
Diff to previous 1.8 (colored)

use more stack allocations for fixed size buffers. ok xsa@ joris@

Revision 1.8 / (download) - annotate - [select for diffs], Fri Jan 19 23:23:21 2007 UTC (17 years, 4 months ago) by joris
Branch: MAIN
Changes since 1.7: +55 -10 lines
Diff to previous 1.7 (colored)

When we hit a DT_UNKNOWN for dirent->d_type in our filelist functions,
stat() the filepath to get the correct type, and therefor
add it to the appropriate list.

This fixes opencvs with CVSROOTs on NFS and AFS, because they
both return D_UNKNOWN for directories (afs even for files too)
in dirent->d_type.

problem found by thib@ and todd@
tested by thib@, todd@,
ok niallo@

Revision 1.7 / (download) - annotate - [select for diffs], Mon Dec 11 07:59:18 2006 UTC (17 years, 5 months ago) by xsa
Branch: MAIN
Changes since 1.6: +4 -1 lines
Diff to previous 1.6 (colored)

Permit checkout from a read-only repository using the -R global option
or using the CVSREADONLYFS environment variable.
Request/test/ok todd@. Man page bits courtesy of jmc@.

Revision 1.6 / (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.5: +9 -13 lines
Diff to previous 1.5 (colored)

snprintf() -> cvs_path_cat()

Revision 1.5 / (download) - annotate - [select for diffs], Fri Nov 10 14:32:44 2006 UTC (17 years, 6 months ago) by xsa
Branch: MAIN
Changes since 1.4: +2 -2 lines
Diff to previous 1.4 (colored)

no magic, "Attic" -> CVS_PATH_ATTIC

Revision 1.4 / (download) - annotate - [select for diffs], Wed Jun 14 12:35:09 2006 UTC (17 years, 11 months ago) by joris
Branch: MAIN
CVS Tags: OPENBSD_4_0_BASE, OPENBSD_4_0
Changes since 1.3: +1 -3 lines
Diff to previous 1.3 (colored)

zap myuid variable, it is not used for anything usefull.

Revision 1.3 / (download) - annotate - [select for diffs], Fri Jun 2 19:10:24 2006 UTC (17 years, 11 months ago) by david
Branch: MAIN
Changes since 1.2: +2 -2 lines
Diff to previous 1.2 (colored)

various spelling fixes

Revision 1.2 / (download) - annotate - [select for diffs], Sat May 27 15:14:27 2006 UTC (17 years, 11 months ago) by joris
Branch: MAIN
Changes since 1.1: +5 -2 lines
Diff to previous 1.1 (colored)

allow commands to respect the -l flag, if the -l flag is
specified certain commands will not recurse into directories.

at the same time introduce a method of specifying wether or not
a command should look in the repository for files.

Revision 1.1 / (download) - annotate - [select for diffs], Sat May 27 03:30:31 2006 UTC (17 years, 11 months ago) by joris
Branch: MAIN

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.

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.