=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/rcs/co.c,v retrieving revision 1.52 retrieving revision 1.53 diff -c -r1.52 -r1.53 *** src/usr.bin/rcs/co.c 2006/01/05 10:28:24 1.52 --- src/usr.bin/rcs/co.c 2006/02/14 13:28:38 1.53 *************** *** 1,4 **** ! /* $OpenBSD: co.c,v 1.52 2006/01/05 10:28:24 xsa Exp $ */ /* * Copyright (c) 2005 Joris Vink * All rights reserved. --- 1,4 ---- ! /* $OpenBSD: co.c,v 1.53 2006/02/14 13:28:38 xsa Exp $ */ /* * Copyright (c) 2005 Joris Vink * All rights reserved. *************** *** 72,77 **** --- 72,81 ---- break; case 'l': rcs_set_rev(rcs_optarg, &rev); + if (flags & CO_UNLOCK) { + cvs_log(LP_ERR, "warning: -u overridden by -l"); + flags &= ~CO_UNLOCK; + } flags |= CO_LOCK; break; case 'M': *************** *** 98,103 **** --- 102,111 ---- break; case 'u': rcs_set_rev(rcs_optarg, &rev); + if (flags & CO_LOCK) { + cvs_log(LP_ERR, "warning: -l overridden by -u"); + flags &= ~CO_LOCK; + } flags |= CO_UNLOCK; break; case 'V': *************** *** 282,288 **** } } ! if (verbose == 1) printf("revision %s", buf); --- 290,296 ---- } } ! if ((verbose == 1) && !(flags & NEWFILE)) printf("revision %s", buf); *************** *** 299,306 **** } mode = 0644; ! if (verbose == 1) ! printf(" (locked)"); } else if (flags & CO_UNLOCK) { if (rcs_lock_remove(file, lockname, frev) < 0) { if (rcs_errno != RCS_ERR_NOENT) --- 307,314 ---- } mode = 0644; ! if ((verbose == 1) && !(flags & NEWFILE)) ! printf(" (locked)\n"); } else if (flags & CO_UNLOCK) { if (rcs_lock_remove(file, lockname, frev) < 0) { if (rcs_errno != RCS_ERR_NOENT) *************** *** 308,320 **** } mode = 0444; ! if (verbose == 1) ! printf(" (unlocked)"); } - if (verbose == 1) - printf("\n"); - if (flags & CO_LOCK) { lcount++; if (lcount > 1) --- 316,325 ---- } mode = 0444; ! if ((verbose == 1) && !(flags & NEWFILE)) ! printf(" (unlocked)\n"); } if (flags & CO_LOCK) { lcount++; if (lcount > 1) *************** *** 368,374 **** cvs_log(LP_ERRNO, "error setting utimes"); } ! if (verbose == 1) printf("done\n"); } --- 373,379 ---- cvs_log(LP_ERRNO, "error setting utimes"); } ! if ((verbose == 1) && !(flags & NEWFILE)) printf("done\n"); }