summaryrefslogtreecommitdiffstats
path: root/lib/bb/fetch2
diff options
context:
space:
mode:
authorYu Ke <ke.yu@intel.com>2010-12-27 10:35:19 +0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2011-02-10 23:35:47 +0000
commitae008059b3ce70bcf5771035bba6f31df8db880a (patch)
tree80b7448fb34996149ee482534d9faf673f79c90a /lib/bb/fetch2
parent6807ecbf3de0a30e878ff67914dea24ec0615320 (diff)
downloadbitbake-ae008059b3ce70bcf5771035bba6f31df8db880a.tar.gz
bb.fetch2.hg: add hg urldata_init
move the hg specific urldata init from localpath to urldata_init so that it can be called early (From Poky rev: f684ff18a2b9565823a41750af369dee392f6142) Signed-off-by: Yu Ke <ke.yu@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'lib/bb/fetch2')
-rw-r--r--lib/bb/fetch2/hg.py14
1 files changed, 9 insertions, 5 deletions
diff --git a/lib/bb/fetch2/hg.py b/lib/bb/fetch2/hg.py
index 9e91bec18..80a155108 100644
--- a/lib/bb/fetch2/hg.py
+++ b/lib/bb/fetch2/hg.py
@@ -43,11 +43,10 @@ class Hg(Fetch):
"""
return ud.type in ['hg']
- def forcefetch(self, url, ud, d):
- revTag = ud.parm.get('rev', 'tip')
- return revTag == "tip"
-
- def localpath(self, url, ud, d):
+ def urldata_init(self, ud, d):
+ """
+ init hg specific variable within url data
+ """
if not "module" in ud.parm:
raise MissingParameterError("hg method needs a 'module' parameter")
@@ -58,6 +57,11 @@ class Hg(Fetch):
ud.pkgdir = os.path.join(data.expand('${HGDIR}', d), ud.host, relpath)
ud.moddir = os.path.join(ud.pkgdir, ud.module)
+ def forcefetch(self, url, ud, d):
+ revTag = ud.parm.get('rev', 'tip')
+ return revTag == "tip"
+
+ def localpath(self, url, ud, d):
if 'rev' in ud.parm:
ud.revision = ud.parm['rev']
else: