summaryrefslogtreecommitdiffstats
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-01-10 20:21:59 +0000
commitf684ff18a2b9565823a41750af369dee392f6142 (patch)
tree60fcf2a37610fccbe2b62aebd75068adce615016
parent7420e70f4f03a18f9d5a0d3226918088af1032bd (diff)
downloadpoky-f684ff18a2b9565823a41750af369dee392f6142.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 Signed-off-by: Yu Ke <ke.yu@intel.com>
-rw-r--r--bitbake/lib/bb/fetch2/hg.py14
1 files changed, 9 insertions, 5 deletions
diff --git a/bitbake/lib/bb/fetch2/hg.py b/bitbake/lib/bb/fetch2/hg.py
index 9e91bec186..80a155108c 100644
--- a/bitbake/lib/bb/fetch2/hg.py
+++ b/bitbake/lib/bb/fetch2/hg.py
@@ -43,11 +43,10 @@ class Hg(Fetch):
43 """ 43 """
44 return ud.type in ['hg'] 44 return ud.type in ['hg']
45 45
46 def forcefetch(self, url, ud, d): 46 def urldata_init(self, ud, d):
47 revTag = ud.parm.get('rev', 'tip') 47 """
48 return revTag == "tip" 48 init hg specific variable within url data
49 49 """
50 def localpath(self, url, ud, d):
51 if not "module" in ud.parm: 50 if not "module" in ud.parm:
52 raise MissingParameterError("hg method needs a 'module' parameter") 51 raise MissingParameterError("hg method needs a 'module' parameter")
53 52
@@ -58,6 +57,11 @@ class Hg(Fetch):
58 ud.pkgdir = os.path.join(data.expand('${HGDIR}', d), ud.host, relpath) 57 ud.pkgdir = os.path.join(data.expand('${HGDIR}', d), ud.host, relpath)
59 ud.moddir = os.path.join(ud.pkgdir, ud.module) 58 ud.moddir = os.path.join(ud.pkgdir, ud.module)
60 59
60 def forcefetch(self, url, ud, d):
61 revTag = ud.parm.get('rev', 'tip')
62 return revTag == "tip"
63
64 def localpath(self, url, ud, d):
61 if 'rev' in ud.parm: 65 if 'rev' in ud.parm:
62 ud.revision = ud.parm['rev'] 66 ud.revision = ud.parm['rev']
63 else: 67 else: