From owner-freebsd-hackers Sat Jun 29 12:53:53 2002 Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 2D10837B401 for ; Sat, 29 Jun 2002 12:53:41 -0700 (PDT) Received: from mailsrv.otenet.gr (mailsrv.otenet.gr [195.170.0.5]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9BFA843E0A for ; Sat, 29 Jun 2002 12:53:39 -0700 (PDT) (envelope-from keramida@FreeBSD.org) Received: from hades.hell.gr (patr530-b200.otenet.gr [212.205.244.208]) by mailsrv.otenet.gr (8.12.4/8.12.4) with ESMTP id g5TJrHXj018335; Sat, 29 Jun 2002 22:53:30 +0300 (EEST) Received: from hades.hell.gr (hades [127.0.0.1]) by hades.hell.gr (8.12.4/8.12.4) with ESMTP id g5TJrDVQ060906; Sat, 29 Jun 2002 22:53:13 +0300 (EEST) (envelope-from keramida@FreeBSD.org) Received: (from charon@localhost) by hades.hell.gr (8.12.4/8.12.4/Submit) id g5THINaM034633; Sat, 29 Jun 2002 20:18:23 +0300 (EEST) (envelope-from keramida@FreeBSD.org) Date: Sat, 29 Jun 2002 20:18:22 +0300 From: Giorgos Keramidas To: Makoto Matsushita Cc: scott@avantgo.com, hackers@FreeBSD.org Subject: Re: cvs(1) bug? with cvs update -rX -DY Message-ID: <20020629171822.GC5643@hades.hell.gr> References: <20020625132020U.matusita@jp.FreeBSD.org> <20020626022052V.matusita@jp.FreeBSD.org> <20020626024424P.matusita@jp.FreeBSD.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="zhXaljGHf11kAtnf" Content-Disposition: inline In-Reply-To: <20020626024424P.matusita@jp.FreeBSD.org> X-Operating-System: FreeBSD 5.0-CURRENT i386 X-PGP-Fingerprint: C1EB 0653 DB8B A557 3829 00F9 D60F 941A 3186 03B6 X-Phone: +30-944-116520 Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG --zhXaljGHf11kAtnf Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On 2002-06-26 02:44 +0000, Makoto Matsushita wrote: > > scott> You could simply pop up a couple directories and checkout the > scott> given tag and date over your existing checkout. CVS is smart > scott> enough to notice that you've already got something checked out, > scott> and it will just update things. > > matusita> It would be fine to me. Thank you. > > Hmm, my cvs(1) doesn't allow me to checkout. > > % rm -rf src > % cvs -R -d /home/ncvs checkout -rRELENG_4 -D"Wed Jun 26 00:00:00 JST 2002" src/contrib/lukemftpd > cvs checkout: Updating src/contrib/lukemftpd > cvs checkout: Updating src/contrib/lukemftpd/src Nope. You have to do this in two steps. First you checkout the files from the proper branch with -r BRANCH_TAG. This makes the branch 'sticky' and subsequent 'update' operations assume the same branch, unless -A is specified. See the transcript shown below. % cd /tmp % cvs -R -d /home/ncvs co -r RELENG_4 -l src cvs checkout: Updating src U src/COPYRIGHT U src/Makefile U src/Makefile.inc1 U src/Makefile.upgrade U src/README U src/UPDATING % cd src % cvs -q up -APdl bin U bin/Makefile U bin/Makefile.inc % cd bin % cvs -q up -APd cat U cat/Makefile U cat/cat.1 U cat/cat.c % cd cat Let's see what the one before the last commit was to the cat.c file. % ident cat.c cat.c: $FreeBSD: src/bin/cat/cat.c,v 1.14.2.7 2002/04/24 13:36:45 asmodai Exp $ The 1.14.2.6 revision was created (as you can verify with `cvs log') shortly before -D '2002-04-24 13:34:00 UTC'. Let's update to that date, or at least attempt to: % cvs -q up -Pd -D '2002-04-24 13:34:00 UTC' cat.c U cat.c % cvs stat cat.c =================================================================== File: cat.c Status: Up-to-date Working revision: 1.21 Sat Jun 29 17:12:00 2002 Repository revision: 1.21 /home/ncvs/src/bin/cat/cat.c,v Sticky Tag: (none) Sticky Date: 2002.04.24.13.34.00 Sticky Options: (none) Nope. Not quite. This is the HEAD revision of the file. Let's see if both a branch AND a date can be specified: % cvs -q up -Pd -rRELENG_4 -D '2002-04-24 13:34:00 UTC' cat.c U cat.c % cvs stat cat.c =================================================================== File: cat.c Status: Needs Patch Working revision: 1.14.2.6 Sat Jun 29 17:12:15 2002 Repository revision: 1.14.2.7 /home/ncvs/src/bin/cat/cat.c,v Sticky Tag: RELENG_4 (branch: 1.14.2) Sticky Date: (none) Sticky Options: (none) Note that cat.c has a sticky tag of RELENG_4 but the working revision is identical to 1.14.2.6 and not 1.14.2.7 which is the latest revision in the RELENG_4 branch :-) So, the proper steps to get the files of a branch other than HEAD, in the revisions they had at a certain point in time would be: + Checkout using the branch as a sticky tag. + Update using both -D DATE and -r BRANCH_TAG. I hope this helps a bit... - Giorgos --zhXaljGHf11kAtnf Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.7 (FreeBSD) iD8DBQE9Hevd1g+UGjGGA7YRAlOzAKCAeNQuIiish0IWdQQK+Z68WolAqwCeKXwn Ygqrax9c2ipAW40hT7QwgaY= =09Wb -----END PGP SIGNATURE----- --zhXaljGHf11kAtnf-- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message