summaryrefslogtreecommitdiff
path: root/usr.bin/cvs/trigger.h
diff options
context:
space:
mode:
authorJoris Vink <joris@cvs.openbsd.org>2008-06-10 01:00:36 +0000
committerJoris Vink <joris@cvs.openbsd.org>2008-06-10 01:00:36 +0000
commit9871af5b3959da6fb3438ea15e89bd35368b5ddf (patch)
treec333bfc469513312bd0c2809225fe699c694fb17 /usr.bin/cvs/trigger.h
parent06b9f18cd5ed2ebd5b5b5b7837380ee2a5b8f116 (diff)
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@
Diffstat (limited to 'usr.bin/cvs/trigger.h')
-rw-r--r--usr.bin/cvs/trigger.h54
1 files changed, 54 insertions, 0 deletions
diff --git a/usr.bin/cvs/trigger.h b/usr.bin/cvs/trigger.h
new file mode 100644
index 00000000000..0f664ea5ed0
--- /dev/null
+++ b/usr.bin/cvs/trigger.h
@@ -0,0 +1,54 @@
+/* $OpenBSD: trigger.h,v 1.1 2008/06/10 01:00:35 joris Exp $ */
+/*
+ * Copyright (c) 2008 Tobias Stoeckmann <tobias@openbsd.org>
+ * Copyright (c) 2008 Jonathan Armani <dbd@asystant.net>
+ *
+ * Permission to use, copy, modify, and distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+#define CVS_TRIGGER_COMMITINFO 1
+#define CVS_TRIGGER_LOGINFO 2
+#define CVS_TRIGGER_VERIFYMSG 3
+#define CVS_TRIGGER_RCSINFO 4
+#define CVS_TRIGGER_EDITINFO 5
+#define CVS_TRIGGER_TAGINFO 6
+
+struct trigger_line {
+ char *line;
+ TAILQ_ENTRY(trigger_line) flist;
+};
+
+TAILQ_HEAD(trigger_list, trigger_line);
+
+struct file_info {
+ char *file_path;
+ char *file_wd;
+ char *crevstr;
+ char *nrevstr;
+ char *tag_new;
+ char *tag_old;
+ char *tag_op;
+ char tag_type;
+ TAILQ_ENTRY(file_info) flist;
+};
+
+TAILQ_HEAD(file_info_list, file_info);
+
+
+
+int cvs_trigger_handle(int, char *, char *,struct trigger_list *,
+ struct file_info_list *);
+struct trigger_list * cvs_trigger_getlines(char *, char *);
+void cvs_trigger_freelist(struct trigger_list *);
+void cvs_trigger_freeinfo(struct file_info_list *);
+void cvs_trigger_loginfo_header(BUF *, char *);