From c6ea4e82f510028441250ec52726bbd8ac8d27be Mon Sep 17 00:00:00 2001 From: Nicholas Marriott Date: Wed, 29 Sep 2010 18:14:53 +0000 Subject: Support for update -C, from zinovik. ok tobias xsa --- usr.bin/cvs/client.c | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) (limited to 'usr.bin/cvs/client.c') diff --git a/usr.bin/cvs/client.c b/usr.bin/cvs/client.c index b41f101f6cc..ba9184b5816 100644 --- a/usr.bin/cvs/client.c +++ b/usr.bin/cvs/client.c @@ -1,4 +1,4 @@ -/* $OpenBSD: client.c,v 1.122 2010/07/23 21:46:05 ray Exp $ */ +/* $OpenBSD: client.c,v 1.123 2010/09/29 18:14:52 nicm Exp $ */ /* * Copyright (c) 2006 Joris Vink * @@ -524,7 +524,22 @@ cvs_client_sendfile(struct cvs_file *cf) cf->file_name); break; case FILE_ADDED: + if (backup_local_changes) /* for update -C */ + cvs_backup_file(cf); + + cvs_client_send_request("Modified %s", cf->file_name); + cvs_remote_send_file(cf->file_path, cf->fd); + break; case FILE_MODIFIED: + if (backup_local_changes) { /* for update -C */ + cvs_backup_file(cf); + cvs_client_send_request("Entry /%s/%s%s/%s/%s/%s", + cf->file_name, "", rev, timebuf, + cf->file_ent->ce_opts ? cf->file_ent->ce_opts : "", + sticky); + break; + } + cvs_client_send_request("Modified %s", cf->file_name); cvs_remote_send_file(cf->file_path, cf->fd); break; -- cgit v1.2.3