Репозитории ALT
S: | 1.11.23-alt9 |
5.1: | 1.11.23-alt3.M50P.1 |
4.1: | 1.11.22-alt3 |
4.0: | 1.11.22-alt2 |
+updates: | 1.11.22-alt2 |
3.0: | 1.11.20-alt1 |
Группа :: Разработка/Прочее
Пакет: cvs
Главная Изменения Спек Патчи Sources Загрузить Gear Bugs and FR Repocop
Патч: cvs-1.11.10-deb-alt-parseopts.patch
Скачать
Скачать
diff -uprk.orig cvs-1.11.10.orig/src/cvs.h cvs-1.11.10/src/cvs.h
--- cvs-1.11.10.orig/src/cvs.h 2003-12-20 21:39:36 +0300
+++ cvs-1.11.10/src/cvs.h 2003-12-20 21:40:01 +0300
@@ -190,6 +190,7 @@ extern int errno;
#define CVSROOTADM_WRITERS "writers"
#define CVSROOTADM_PASSWD "passwd"
#define CVSROOTADM_CONFIG "config"
+#define CVSROOTADM_OPTIONS "options"
#define CVSNULLREPOS "Emptydir" /* an empty directory */
@@ -473,6 +474,7 @@ int pathname_levels PROTO ((char *path))
typedef int (*CALLPROC) PROTO((char *repository, char *value));
int Parse_Info PROTO((char *infofile, char *repository, CALLPROC callproc, int all));
extern int parse_config PROTO ((char *));
+extern void parse_opts PROTO ((const char *root));
typedef RETSIGTYPE (*SIGCLEANUPPROC) PROTO(());
int SIG_register PROTO((int sig, SIGCLEANUPPROC sigcleanup));
diff -uprk.orig cvs-1.11.10.orig/src/main.c cvs-1.11.10/src/main.c
--- cvs-1.11.10.orig/src/main.c 2003-10-08 19:49:43 +0400
+++ cvs-1.11.10/src/main.c 2003-12-20 21:40:01 +0300
@@ -974,6 +974,9 @@ Copyright (c) 1989-2003 Brian Berliner,
if we didn't, then there would be no way to check in a new
CVSROOT/config file to fix the broken one! */
parse_config (current_parsed_root->directory);
+
+ /* Now is a convenient time to read CVSROOT/options */
+ parse_opts (current_parsed_root->directory);
}
#ifdef CLIENT_SUPPORT
@@ -1162,3 +1165,59 @@ usage (cpp)
(void) fprintf (stderr, *cpp);
error_exit ();
}
+
+void
+parse_opts (root)
+ const char *root;
+{
+ char *path;
+ char buf[1024];
+ const char *p;
+ char *q;
+ FILE *fp;
+
+ if (root == NULL) {
+ error (0, 0, "parse_opts: no CVSROOT");
+ return;
+ }
+ p = strchr (root, ':');
+ if (p)
+ p++;
+ else
+ p = root;
+ if (p == NULL) {
+ error (0, 0, "parse_opts: mangled CVSROOT");
+ return;
+ }
+ xasprintf (&path, "%s/%s/%s", p, CVSROOTADM, CVSROOTADM_OPTIONS);
+ if ((fp = fopen(path, "r")) != NULL) {
+ while (fgets(buf, sizeof buf, fp) != NULL) {
+ if (buf[0] == '#')
+ continue;
+ q = strrchr(buf, '\n');
+ if (q)
+ *q = '\0';
+
+ if (!strncmp(buf, "tag=", 4)) {
+ char *rcs_localid;
+
+ rcs_localid = buf + 4;
+ RCS_setlocalid(rcs_localid);
+ }
+ if (!strncmp(buf, "tagexpand=", 10)) {
+ char *rcs_incexc;
+
+ rcs_incexc = buf + 10;
+ RCS_setincexc(rcs_incexc);
+ }
+ /*
+ * OpenBSD has a "umask=" and "dlimit=" command, we silently
+ * ignore them here since they are not much use to us. cvsumask
+ * defaults to 002 already, and the dlimit (data size limit)
+ * should really be handled elsewhere (eg: login.conf).
+ */
+ }
+ fclose(fp);
+ }
+ free (path);
+}
diff -uprk.orig cvs-1.11.10.orig/src/server.c cvs-1.11.10/src/server.c
--- cvs-1.11.10.orig/src/server.c 2003-12-20 21:39:36 +0300
+++ cvs-1.11.10/src/server.c 2003-12-20 21:41:10 +0300
@@ -776,6 +776,9 @@ E Protocol error: Root says \"%s\" but p
nothing. But for rsh, we need to do it now. */
parse_config (current_parsed_root->directory);
+ /* Now is a good time to read CVSROOT/options too. */
+ parse_opts (current_parsed_root->directory);
+
path = xmalloc (strlen (current_parsed_root->directory)
+ sizeof (CVSROOTADM)
+ 2);