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 /bitbake/lib/bb | |
parent | 17ea15299092af177f7065d4fa96840d41d35cec (diff) | |
download | poky-489d17596d2c532f2d8db3ef8c0f122ca49bb466.tar.gz |
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>
Diffstat (limited to 'bitbake/lib/bb')
-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 | |||
36 | from bb.fetch import logger | 36 | from bb.fetch import logger |
37 | 37 | ||
38 | class Hg(Fetch): | 38 | class Hg(Fetch): |
39 | """Class to fetch a from mercurial repositories""" | 39 | """Class to fetch from mercurial repositories""" |
40 | def supports(self, url, ud, d): | 40 | def supports(self, url, ud, d): |
41 | """ | 41 | """ |
42 | Check to see if a given url can be fetched with mercurial. | 42 | Check to see if a given url can be fetched with mercurial. |
43 | """ | 43 | """ |
44 | return ud.type in ['hg'] | 44 | return ud.type in ['hg'] |
45 | 45 | ||
46 | def forcefetch(self, url, ud, d): | ||
47 | if 'rev' in ud.parm: | ||
48 | revTag = ud.parm['rev'] | ||
49 | else: | ||
50 | revTag = "tip" | ||
51 | return revTag == "tip" | ||
52 | |||
46 | def localpath(self, url, ud, d): | 53 | def localpath(self, url, ud, d): |
47 | if not "module" in ud.parm: | 54 | if not "module" in ud.parm: |
48 | raise MissingParameterError("hg method needs a 'module' parameter") | 55 | raise MissingParameterError("hg method needs a 'module' parameter") |