summaryrefslogtreecommitdiff
path: root/bitbake/lib/bb/fetch2/hg.py
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2011-02-07 12:08:32 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2011-02-07 16:52:42 +0000
commit37624b97450f2ba3d6fad3e1e51818486451447e (patch)
tree6d5286aeb128da853f829ee28923005fb29405fe /bitbake/lib/bb/fetch2/hg.py
parent1d3fdc85c64b07a228bcf2a370024c250f6e6623 (diff)
downloadopenembedded-core-37624b97450f2ba3d6fad3e1e51818486451447e.tar.gz
openembedded-core-37624b97450f2ba3d6fad3e1e51818486451447e.tar.bz2
openembedded-core-37624b97450f2ba3d6fad3e1e51818486451447e.tar.xz
openembedded-core-37624b97450f2ba3d6fad3e1e51818486451447e.zip
bitbake/fetch2: Update forcefetch and mirror handling to clean up, simplfy and bug fix the code
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.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/bitbake/lib/bb/fetch2/hg.py b/bitbake/lib/bb/fetch2/hg.py
index d186b009d..ac5825baa 100644
--- a/bitbake/lib/bb/fetch2/hg.py
+++ b/bitbake/lib/bb/fetch2/hg.py
@@ -64,9 +64,13 @@ class Hg(FetchMethod):
ud.localfile = data.expand('%s_%s_%s_%s.tar.gz' % (ud.module.replace('/', '.'), ud.host, ud.path.replace('/', '.'), ud.revision), d)
- def forcefetch(self, url, ud, d):
+ def need_update(self, url, ud, d):
revTag = ud.parm.get('rev', 'tip')
- return revTag == "tip"
+ if revTag == "tip":
+ return True
+ if not os.path.exists(ud.localpath):
+ return True
+ return False
def _buildhgcommand(self, ud, d, command):
"""