From owner-freebsd-hackers@FreeBSD.ORG Fri Nov 9 13:52:58 2007 Return-Path: Delivered-To: hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6209116A418 for ; Fri, 9 Nov 2007 13:52:58 +0000 (UTC) (envelope-from stsp@stsp.name) Received: from einhorn.in-berlin.de (einhorn.in-berlin.de [192.109.42.8]) by mx1.freebsd.org (Postfix) with ESMTP id D05B413C494 for ; Fri, 9 Nov 2007 13:52:57 +0000 (UTC) (envelope-from stsp@stsp.name) X-Envelope-From: stsp@stsp.name Received: from stsp.lan (world77.mi.fu-berlin.de [160.45.115.77]) (authenticated bits=128) by einhorn.in-berlin.de (8.13.6/8.13.6/Debian-1) with ESMTP id lA9DqkkW025796 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Fri, 9 Nov 2007 14:52:47 +0100 Received: from jack.stsp.lan (stsp@localhost.stsp.lan [127.0.0.1]) by stsp.lan (8.14.1/8.14.1) with ESMTP id lA9DqjnD015985; Fri, 9 Nov 2007 14:52:45 +0100 (CET) Received: (from stsp@localhost) by jack.stsp.lan (8.14.1/8.14.1/Submit) id lA9Dqiql010987; Fri, 9 Nov 2007 14:52:44 +0100 (CET) X-Authentication-Warning: jack.stsp.lan: stsp set sender to stsp@stsp.name using -f Date: Fri, 9 Nov 2007 14:52:44 +0100 From: Stefan Sperling To: "Aryeh M. Friedman" Message-ID: <20071109135244.GC27811@jack.stsp.lan> References: <4733E878.2050804@gmail.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="jq0ap7NbKX2Kqbes" Content-Disposition: inline In-Reply-To: <4733E878.2050804@gmail.com> User-Agent: Mutt/1.5.16 (2007-06-09) X-Scanned-By: MIMEDefang_at_IN-Berlin_e.V. on 192.109.42.8 Cc: hackers@freebsd.org Subject: Re: questions on development(7) X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Nov 2007 13:52:58 -0000 --jq0ap7NbKX2Kqbes Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Nov 09, 2007 at 04:56:24AM +0000, Aryeh M. Friedman wrote: > 1. If I am modifing code and such should I have a local branch? You can either maintain a local branch or keep backing up your diffs against the main source tree. Which one is better depends on the size of your changes and your workflow. I've used both. Maintaining your own local branch means much more cvs-related overhead but may be worth it if you need your changes versioned properly. > 2. If yes to #1 how do I setup keeping everything except my modified > code in sync (and if possible to retro activally apply patchs from the > local branch unto the main source tree [/usr/src2]) Just run cvsup to update your copy of the cvs repository as usual, it should not delete your branch. The development(7) man page says that it can in some cases delete your branch though, so you should regularly back up your branch as a diff against the upstream branch you are based on, and possibly back up your copy of the cvs repository before updating. > 3. The documentation said very little about how to generate patchs > between my local code and the main branch > a. Ideally I want to set it up where when I am done with a > modification it automatically creates a patch (I have never used CVS > for anything except through csup and cvsup so I am totally lost here) I don't think this list is appropriate for basic CVS questions, but I give you a few hints anyway because development(7) does not mention them: You need to tag the point you are branching from in CVS, otherwise you cannot create meaningful diffs between your own branch and the upstream branch. So to create a branch you can actually use, you need to run the rtag command TWICE. For example, to branch RELENG_7, use: export CVS_LOCAL_BRANCH_NUM=3D424242 cvs -d $CVSROOT rtag -r RELENG_7 MY_BRANCH_BP cvs -d $CVSROOT rtag -r RELENG_7 -b MY_BRANCH You should also create descriptive tags on both branches before and after doing a merge, to make it easier to track what has been merged where and when. Otherwise continuously syncing your branch with upstream becomes a pain quickly. You can maintain several custom branches in a single repository by switching CVS_LOCAL_BRANCH_NUM. Just don't end up confusing your branches. Always use the same CVS_LOCAL_BRANCH_NUM setting for all tag and rtag commands operating on the same branch. Warning: Branching and merging in CVS is hard! Not because branching and merging in general is hard, but simply because CVS is brain damaged. You will very likely mess it up the first time. You should practise on a test repo until you feel confident that you understand it properly. For more information see http://cvsbook.red-bean.com/ and especially http://cvsbook.red-bean.com/cvsbook.html#Branches --=20 stefan http://stsp.name PGP Key: 0xF59D25F0 --jq0ap7NbKX2Kqbes Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.7 (OpenBSD) iD8DBQFHNGYs5dMCc/WdJfARAkK+AKDm3VV9c6T5vZSaNJsn5nXKejcx5wCgqBte BFthzGYIZ8RNeKLneQzDfdY= =uGdh -----END PGP SIGNATURE----- --jq0ap7NbKX2Kqbes--