--- bitbake/lib/bb/fetch/hg.py~	2009-08-18 11:12:41.000000000 +1000
+++ bitbake/lib/bb/fetch/hg.py	2009-09-04 13:19:37.000000000 +1000
@@ -34,13 +34,21 @@
 from bb.fetch import runfetchcmd
 
 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")
@@ -108,7 +116,7 @@
         """Fetch url"""
 
         # try to use the tarball stash
-        if Fetch.try_mirror(d, ud.localfile):
+        if not self.forcefetch(loc, ud, d) and Fetch.try_mirror(d, ud.localfile):
             bb.msg.debug(1, bb.msg.domain.Fetcher, "%s already exists or was mirrored, skipping hg checkout." % ud.localpath)
             return
 
