summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/bb/fetch2/hg.py
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2011-02-03 21:17:26 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2011-02-07 09:06:35 +0000
commit972eb5fababb33b5537fcfbbaf8e33ea820f0fee (patch)
tree2bd453bc66853c72cb284067d6679d6f498cd77b /bitbake/lib/bb/fetch2/hg.py
parent0e5404cedadaea6738ef6468d7eb8a24d23d9bab (diff)
downloadpoky-972eb5fababb33b5537fcfbbaf8e33ea820f0fee.tar.gz
bitbake/fetch2: Move ud.localfile setup into urldata_init
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/bb/fetch2/hg.py')
-rw-r--r--bitbake/lib/bb/fetch2/hg.py12
1 files changed, 6 insertions, 6 deletions
diff --git a/bitbake/lib/bb/fetch2/hg.py b/bitbake/lib/bb/fetch2/hg.py
index 13e9b8673b..53eeea9a89 100644
--- a/bitbake/lib/bb/fetch2/hg.py
+++ b/bitbake/lib/bb/fetch2/hg.py
@@ -57,18 +57,18 @@ class Hg(Fetch):
57 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)
58 ud.moddir = os.path.join(ud.pkgdir, ud.module) 58 ud.moddir = os.path.join(ud.pkgdir, ud.module)
59 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):
65 if 'rev' in ud.parm: 60 if 'rev' in ud.parm:
66 ud.revision = ud.parm['rev'] 61 ud.revision = ud.parm['rev']
67 elif not ud.revision: 62 elif not ud.revision:
68 ud.revision = self.latest_revision(url, ud, d) 63 ud.revision = self.latest_revision(ud.url, ud, d)
69 64
70 ud.localfile = data.expand('%s_%s_%s_%s.tar.gz' % (ud.module.replace('/', '.'), ud.host, ud.path.replace('/', '.'), ud.revision), d) 65 ud.localfile = data.expand('%s_%s_%s_%s.tar.gz' % (ud.module.replace('/', '.'), ud.host, ud.path.replace('/', '.'), ud.revision), d)
71 66
67 def forcefetch(self, url, ud, d):
68 revTag = ud.parm.get('rev', 'tip')
69 return revTag == "tip"
70
71 def localpath(self, url, ud, d):
72 return os.path.join(data.getVar("DL_DIR", d, True), ud.localfile) 72 return os.path.join(data.getVar("DL_DIR", d, True), ud.localfile)
73 73
74 def _buildhgcommand(self, ud, d, command): 74 def _buildhgcommand(self, ud, d, command):