summaryrefslogtreecommitdiff
path: root/usr.bin/cvs/commit.c
diff options
context:
space:
mode:
authorJoris Vink <joris@cvs.openbsd.org>2006-07-07 17:37:18 +0000
committerJoris Vink <joris@cvs.openbsd.org>2006-07-07 17:37:18 +0000
commit3b8d87766176c8c22119cca9b60143e0b8b842d3 (patch)
treea75735ef3dd068f9476605fc1b104c93f293d539 /usr.bin/cvs/commit.c
parent0bc2e30232a85b2aea92a0a6a147bb29e7f9088e (diff)
first part of opencvs remote, fairly useable on existing trees
although i advise against using it on real development trees for now. only a few commands work right so far: - commit - diff - status - log - update (partially working) if you feel like testing remote and run into bugs feel free to contact me, and please include a full trace (-t).
Diffstat (limited to 'usr.bin/cvs/commit.c')
-rw-r--r--usr.bin/cvs/commit.c24
1 files changed, 22 insertions, 2 deletions
diff --git a/usr.bin/cvs/commit.c b/usr.bin/cvs/commit.c
index cf4c9fb8c90..9a66ddfb60d 100644
--- a/usr.bin/cvs/commit.c
+++ b/usr.bin/cvs/commit.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: commit.c,v 1.79 2006/07/02 21:01:48 joris Exp $ */
+/* $OpenBSD: commit.c,v 1.80 2006/07/07 17:37:17 joris Exp $ */
/*
* Copyright (c) 2006 Joris Vink <joris@openbsd.org>
* Copyright (c) 2006 Xavier Santolaria <xsa@openbsd.org>
@@ -21,8 +21,8 @@
#include "cvs.h"
#include "diff.h"
#include "log.h"
+#include "remote.h"
-int cvs_commit(int, char **);
void cvs_commit_local(struct cvs_file *);
void cvs_commit_check_conflicts(struct cvs_file *);
@@ -87,6 +87,26 @@ cvs_commit(int argc, char **argv)
if (logmsg == NULL)
fatal("please use -m or -F to specify a log message for now");
+ if (current_cvsroot->cr_method != CVS_METHOD_LOCAL) {
+ cr.enterdir = NULL;
+ cr.leavedir = NULL;
+ cr.fileproc = cvs_client_sendfile;
+ cr.flags = flags;
+
+ if (argc > 0)
+ cvs_file_run(argc, argv, &cr);
+ else
+ cvs_file_run(1, &arg, &cr);
+
+ cvs_client_send_request("Argument -m%s", logmsg);
+
+ cvs_client_send_files(argv, argc);
+ cvs_client_senddir(".");
+ cvs_client_send_request("ci");
+ cvs_client_get_responses();
+ return (0);
+ }
+
TAILQ_INIT(&files_affected);
conflicts_found = 0;