From: Takashi Iwai Subject: Re: Hg repo usage notes. Date: Fri, 12 May 2006 14:28:56 +0200 Message-ID: References: <200605121307.41000.linux@blennerhassett.gen.nz> Mime-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=US-ASCII Return-path: Received: from mx2.suse.de (ns2.suse.de [195.135.220.15]) by alsa.jcu.cz (ALSA's E-mail Delivery System) with ESMTP id E5FFE164 for ; Fri, 12 May 2006 14:29:04 +0200 (MEST) In-Reply-To: <200605121307.41000.linux@blennerhassett.gen.nz> Sender: alsa-devel-admin@lists.sourceforge.net Errors-To: alsa-devel-admin@lists.sourceforge.net List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , List-Archive: To: Eliot Blennerhassett Cc: alsa-devel@alsa-project.org List-Id: alsa-devel@alsa-project.org At Fri, 12 May 2006 13:07:40 +1200, Eliot Blennerhassett wrote: > > Hi all, > > I have been trying to get my head around how to use Hg repo e.g. get latest > code, fix something, make a patch etc. Perhaps something like the following > would be useful on the download page? I'm a total newbie to Hg, so please > step in and set me right about the correct/desirable/easier ways to do this. It's a nice documentation. > # Get a copy of the repository > cd alsa-hg > > hg clone http://hg-mirror.alsa-project.org/alsa-driver alsa-driver > hg clone http://hg-mirror.alsa-project.org/alsa-kernel alsa-kernel > > # Get latest > hg pull -u > > # Create a working copy > hg clone alsa-driver alsa-driver-fixbug1 > cd alsa-driver-fixbug1 > ./cvscompile > do { code; test;} until finished; > hg commit -m"Fixed the foo in bar" Use the following style for a commit log: A short summary of your change in a single line Changelog details.... .... Signed-off-by: Foo Bar It's required especially for alsa-kernel tree since it's pushed to the standard linux kernel tree later. > # What to do about sending the changes back ? > hg outgoing ../alsa-driver It can be "hg outgoing default", too. > hg outgoing -p ../alsa-driver > foobar.patch > #OR bundle (which is preferred) > hg bundle foobar.hg ../alsa-driver > #OR > hg export (?what?) > foobar.patch > > # email foobar.[hg,patch] to alsa-devel? The bundle file is unsuitable for submission. Please use always a patch file. > # Other notes > add to .hg/hgrc to avoid having to spec the path for hg > [incoming,outgoing,bundle]: > > default-push= /path/to/alsa-driver One thing to care is the sync with upstream. When the upstream is changed while you already modified and committed on your local repo, the pull and "update -m" will require a new merge commit. If you do export or bundle from this repo, it will contain the commit for that merge, too. It's not good for the patch submission. For avoiding this, a cherry-picking is necessary. On Hg, you can do it by exporting and importing the changes. - Get changes via hg export on your local repo % cd /my/own/alsa-driver % hg export ORIGINAL-STATE:tip > my-patch - On a master repo, you can "pull -u" % cd /upstream/alsa-driver % hg pull -u Then you can apply the patch % hg import /my/own/alsa-driver/my-patch Takashi ------------------------------------------------------- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642