aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorPeter Chubb <peter.chubb@nicta.com.au>2009-09-03 17:31:40 +0000
committerChris Larson <chris_larson@mentor.com>2010-11-08 07:49:24 -0700
commit01b85608d8a37f8af66dfd80133e950120679079 (patch)
treec392c40ec3fdc906ff93947f5a976c63764c9aac /lib
parent83cdb23f8b89453a3527a276bd0b4deb85d63deb (diff)
downloadbitbake-01b85608d8a37f8af66dfd80133e950120679079.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. Signed-off-by: Peter Chubb <peter.chubb@nicta.com.au> Signed-off-by: Chris Larson <chris_larson@mentor.com>
Diffstat (limited to 'lib')
-rw-r--r--lib/bb/fetch/hg.py9
1 files changed, 8 insertions, 1 deletions
diff --git a/lib/bb/fetch/hg.py b/lib/bb/fetch/hg.py
index f70611017..ca3a084bb 100644
--- a/lib/bb/fetch/hg.py
+++ b/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")