Received: from [203.143.174.143] (helo=lemon.ken.nicta.com.au) by linuxtogo.org with esmtp (Exim 4.69) (envelope-from ) id 1MjPp0-0001tS-2i for openembedded-devel@openembedded.org; Fri, 04 Sep 2009 05:50:46 +0200 Received: from vampire.ertos.nicta.com.au ([203.143.161.65]:34281 helo=rhino.keg.ertos.in.nicta.com.au.chubb.wattle.id.au) by lemon.ken.nicta.com.au with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.69) (envelope-from ) id 1MjPX3-0003OM-1P for openembedded-devel@openembedded.org; Fri, 04 Sep 2009 13:32:17 +1000 Date: Fri, 04 Sep 2009 13:31:40 +1000 Message-ID: <87eiqnbd2b.wl%peter@chubb.wattle.id.au> From: Peter Chubb To: openembedded-devel@openembedded.org User-Agent: Wanderlust/2.14.0 (Africa) SEMI/1.14.6 (Maruoka) FLIM/1.14.9 (=?ISO-8859-4?Q?Goj=F2?=) APEL/10.7 MULE XEmacs/21.4 (patch 21) (Educational Television) (i486-linux-gnu) X-Face: GgFg(Z>fx((4\32hvXq<)|jndSniCH~~$D)Ka:P@e@JR1P%Vr}EwUdfwf-4j\rUs#JR{'h# !]])6%Jh~b$VA|ALhnpPiHu[-x~@<"@Iv&|%R)Fq[[, (&Z'O)Q)xCqe1\M[F8#9l8~}#u$S$Rm`S9% \'T@`:&8>Sb*c5d'=eDYI&GF`+t[LfDH="MP5rwOO]w>ALi7'=QJHz&y&C&TE_3j! Organization: National ICT Australia MIME-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") X-SA-Exim-Connect-IP: 203.143.161.65 X-SA-Exim-Mail-From: peter.chubb@nicta.com.au X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on lemon.ken.nicta.com.au X-Spam-Level: X-Spam-Status: No, score=-3.2 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.2.5 X-SA-Exim-Version: 4.2.1 (built Wed, 25 Jun 2008 17:20:11 +0000) X-SA-Exim-Scanned: Yes (on lemon.ken.nicta.com.au) Subject: Allow mercurial fetcher to follow tip X-BeenThere: openembedded-devel@lists.openembedded.org X-Mailman-Version: 2.1.11 Precedence: list Reply-To: openembedded-devel@lists.openembedded.org List-Id: Using the OpenEmbedded metadata to build Distributions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Sep 2009 03:50:46 -0000 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable There are occasions when developing when I want a package always to grab the latest copy of a package. Witht eh CVS fetcher you can do this by setting the `date' tag to `now'. This patch adds similar functionality to the mercurial fetcher: if the revision to fetch is `tip' then always grab from the server, and don't use the cached tarball. Oh, and I fixed a typo in the Class comment. Signed-off-by: Peter Chubb --- bitbake/lib/bb/fetch/hg.py~ 2009-08-18 11:12:41.000000000 +1000 +++ bitbake/lib/bb/fetch/hg.py 2009-09-04 13:19:37.000000000 +1000 @@ -34,13 +34,21 @@ from bb.fetch import runfetchcmd =20 class Hg(Fetch): - """Class to fetch a from mercurial repositories""" + """Class to fetch from mercurial repositories""" def supports(self, url, ud, d): """ Check to see if a given url can be fetched with mercurial. """ return ud.type in ['hg'] =20 + def forcefetch(self, url, ud, d): + if 'rev' in ud.parm: + revTag =3D ud.parm['rev'] + else: + revTag =3D "tip" + return revTag =3D=3D "tip" + + def localpath(self, url, ud, d): if not "module" in ud.parm: raise MissingParameterError("hg method needs a 'module' parame= ter") @@ -108,7 +116,7 @@ """Fetch url""" =20 # try to use the tarball stash - if Fetch.try_mirror(d, ud.localfile): + if not self.forcefetch(loc, ud, d) and Fetch.try_mirror(d, ud.loca= lfile): bb.msg.debug(1, bb.msg.domain.Fetcher, "%s already exists or w= as mirrored, skipping hg checkout." % ud.localpath) return =20 -- Dr Peter Chubb www.nicta.com.au peter DOT chubb AT nicta.com.au http://www.ertos.nicta.com.au ERTOS within National ICT Australia =46rom Imagination to Impact Imagining the (ICT) Futu= re