diff options
author | Joris Vink <joris@cvs.openbsd.org> | 2007-07-03 13:22:44 +0000 |
---|---|---|
committer | Joris Vink <joris@cvs.openbsd.org> | 2007-07-03 13:22:44 +0000 |
commit | bd5e0281b3317c92d15c4e781c2c3df1c90827d1 (patch) | |
tree | b60313fa62ffbfe07b7c94dfacc59e7b1f468368 /usr.bin/cvs/rcs.c | |
parent | 0a517d4100b3c41e5336ee809374a2e7e0e7249e (diff) |
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!
Diffstat (limited to 'usr.bin/cvs/rcs.c')
-rw-r--r-- | usr.bin/cvs/rcs.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/usr.bin/cvs/rcs.c b/usr.bin/cvs/rcs.c index 9cb8b14eee2..4973f3f31a1 100644 --- a/usr.bin/cvs/rcs.c +++ b/usr.bin/cvs/rcs.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rcs.c,v 1.214 2007/06/28 21:38:09 xsa Exp $ */ +/* $OpenBSD: rcs.c,v 1.215 2007/07/03 13:22:43 joris Exp $ */ /* * Copyright (c) 2004 Jean-Francois Brousseau <jfb@openbsd.org> * All rights reserved. @@ -2560,6 +2560,12 @@ rcs_translate_tag(const char *revstr, RCSFILE *rfp) rdp = NULL; + if (!strcmp(revstr, RCS_HEAD_BRANCH)) { + frev = rcsnum_alloc(); + rcsnum_cpy(rfp->rf_head, frev, 0); + return (frev); + } + /* Possibly we could be passed a version number */ if ((frev = rcsnum_parse(revstr)) != NULL) return (frev); |