From 9fac60a5edb4d91f7a39943c017b4040df584793 Mon Sep 17 00:00:00 2001 From: joris Date: Fri, 7 Jul 2006 17:37:17 +0000 Subject: 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). --- usr.bin/cvs/commit.c | 24 ++++++++++++++++++++++-- 1 file changed, 22 insertions(+), 2 deletions(-) (limited to 'usr.bin/cvs/commit.c') 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 * Copyright (c) 2006 Xavier Santolaria @@ -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; -- cgit v1.2.3-59-g8ed1b