summaryrefslogtreecommitdiff
path: root/usr.bin/cvs/history.c
diff options
context:
space:
mode:
authorJoris Vink <joris@cvs.openbsd.org>2007-07-03 13:22:44 +0000
committerJoris Vink <joris@cvs.openbsd.org>2007-07-03 13:22:44 +0000
commitbd5e0281b3317c92d15c4e781c2c3df1c90827d1 (patch)
treeb60313fa62ffbfe07b7c94dfacc59e7b1f468368 /usr.bin/cvs/history.c
parent0a517d4100b3c41e5336ee809374a2e7e0e7249e (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/history.c')
-rw-r--r--usr.bin/cvs/history.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/usr.bin/cvs/history.c b/usr.bin/cvs/history.c
index 085c905307d..3cb1d236033 100644
--- a/usr.bin/cvs/history.c
+++ b/usr.bin/cvs/history.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: history.c,v 1.31 2007/06/28 21:38:09 xsa Exp $ */
+/* $OpenBSD: history.c,v 1.32 2007/07/03 13:22:43 joris Exp $ */
/*
* Copyright (c) 2007 Joris Vink <joris@openbsd.org>
*
@@ -87,9 +87,6 @@ cvs_history_add(int type, struct cvs_file *cf, const char *argument)
/* construct repository field */
if (cvs_cmdop != CVS_OP_CHECKOUT && cvs_cmdop != CVS_OP_EXPORT) {
cvs_get_repository_name(".", repo, sizeof(repo));
-
- if (strlen(repo) > strlen(cwd))
- fatal("bad repository `%s'", repo);
} else {
strlcpy(repo, argument, sizeof(repo));
}