diff options
author | Peter Chubb <peter.chubb@nicta.com.au> | 2009-09-03 17:31:40 +0000 |
---|---|---|
committer | Richard Purdie <rpurdie@linux.intel.com> | 2011-01-04 14:46:38 +0000 |
commit | 489d17596d2c532f2d8db3ef8c0f122ca49bb466 (patch) | |
tree | 5744166f7f5020842cf06d3b3789019dbc5f7e66 | |
parent | 17ea15299092af177f7065d4fa96840d41d35cec (diff) | |
download | openembedded-core-489d17596d2c532f2d8db3ef8c0f122ca49bb466.tar.gz openembedded-core-489d17596d2c532f2d8db3ef8c0f122ca49bb466.tar.bz2 openembedded-core-489d17596d2c532f2d8db3ef8c0f122ca49bb466.zip |
Allow mercurial fetcher to follow tip
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.
(Bitbake rev: 01b85608d8a37f8af66dfd80133e950120679079)
Signed-off-by: Peter Chubb <peter.chubb@nicta.com.au>
Signed-off-by: Chris Larson <chris_larson@mentor.com>
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
-rw-r--r-- | bitbake/lib/bb/fetch/hg.py | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/bitbake/lib/bb/fetch/hg.py b/bitbake/lib/bb/fetch/hg.py index f70611017b..ca3a084bb6 100644 --- a/bitbake/lib/bb/fetch/hg.py +++ b/bitbake/lib/bb/fetch/hg.py @@ -36,13 +36,20 @@ from bb.fetch import runfetchcmd from bb.fetch import logger 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'] + def forcefetch(self, url, ud, d): + if 'rev' in ud.parm: + revTag = ud.parm['rev'] + else: + revTag = "tip" + return revTag == "tip" + def localpath(self, url, ud, d): if not "module" in ud.parm: raise MissingParameterError("hg method needs a 'module' parameter") |