summaryrefslogtreecommitdiff
path: root/usr.bin/cvs/client.c
diff options
context:
space:
mode:
authorNicholas Marriott <nicm@cvs.openbsd.org>2010-09-29 18:14:53 +0000
committerNicholas Marriott <nicm@cvs.openbsd.org>2010-09-29 18:14:53 +0000
commitc6ea4e82f510028441250ec52726bbd8ac8d27be (patch)
tree3036e758f9cf92a085ec9fd0a682a8b9316496e9 /usr.bin/cvs/client.c
parent515b6e60d73f229d5beca6266d98e68f167b937a (diff)
Support for update -C, from zinovik.
ok tobias xsa
Diffstat (limited to 'usr.bin/cvs/client.c')
-rw-r--r--usr.bin/cvs/client.c17
1 files changed, 16 insertions, 1 deletions
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 <joris@openbsd.org>
*
@@ -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;