From ea48eba6c2133b615b71875dd5a845717c8b2d95 Mon Sep 17 00:00:00 2001 From: joris Date: Mon, 4 Feb 2008 22:36:40 +0000 Subject: CVSROOT/modules: correct -i and -o usage -i runs the program specified on commit -o runs the program specified on checkout --- usr.bin/cvs/commit.c | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) (limited to 'usr.bin/cvs/commit.c') diff --git a/usr.bin/cvs/commit.c b/usr.bin/cvs/commit.c index bbc302e1797..48116852fcc 100644 --- a/usr.bin/cvs/commit.c +++ b/usr.bin/cvs/commit.c @@ -1,4 +1,4 @@ -/* $OpenBSD: commit.c,v 1.126 2008/02/04 15:07:33 tobias Exp $ */ +/* $OpenBSD: commit.c,v 1.127 2008/02/04 22:36:40 joris Exp $ */ /* * Copyright (c) 2006 Joris Vink * Copyright (c) 2006 Xavier Santolaria @@ -54,10 +54,11 @@ struct cvs_cmd cvs_cmd_commit = { int cvs_commit(int argc, char **argv) { - int ch, Fflag, mflag; - char *arg = "."; int flags; + int ch, Fflag, mflag; + struct module_checkout *mc; struct cvs_recursion cr; + char *arg = ".", repo[MAXPATHLEN]; flags = CR_RECURSE_DIRS; Fflag = mflag = 0; @@ -156,6 +157,12 @@ cvs_commit(int argc, char **argv) cr.fileproc = cvs_commit_local; cvs_file_walklist(&files_affected, &cr); cvs_file_freelist(&files_affected); + + cvs_get_repository_name(".", repo, MAXPATHLEN); + mc = cvs_module_lookup(repo); + if (mc->mc_prog != NULL && + (mc->mc_flags & MODULE_RUN_ON_COMMIT)) + cvs_exec(mc->mc_prog); } xfree(logmsg); -- cgit v1.2.3-59-g8ed1b