diff -Nru bitbake-1.6.6-clean/lib/bb/fetch/__init__.py bitbake-1.6.6-om2/lib/bb/fetch/__init__.py
--- bitbake-1.6.6-clean/lib/bb/fetch/__init__.py	2007-02-16 12:21:43.000000000 +0100
+++ bitbake-1.6.6-om2/lib/bb/fetch/__init__.py	2007-03-05 23:20:19.000000000 +0100
@@ -31,6 +31,11 @@
 class FetchError(Exception):
     """Exception raised when a download fails"""
 
+class QueryError(Exception):
+    """Exception raised when the remote querying of a ressource fails in a way that doesn't necessarily indicate that a subsequent fetch will fail."""
+    ## For use e.g. with remote querying of the SVN revision information which is only supported
+    ## in SVN from version FIXME on.
+
 class NoMethodError(Exception):
     """Exception raised when there is no method to obtain a supplied url or set of urls"""
 
@@ -109,6 +114,20 @@
             return m.localpath(url, d)
     return url
 
+def compute_revisions(d):
+    """Return a (possibly empty) list of revision identifiers for urls that point to repositories (svn, cvs, etc.).
+    If at all possible, these are generated by remotely querying the repository and thus should not incur much additional
+    network traffic.
+    """
+    
+    result = []
+    for m in methods:
+        for u in m.urls:
+            revs = m.compute_revisions(u, d)
+            if revs:
+                result.extend( revs )
+    return result
+
 class Fetch(object):
     """Base class for 'fetch'ing data"""
 
@@ -130,6 +149,11 @@
         """
         return url
     localpath = staticmethod(localpath)
+    
+    def compute_revisions(self, url, d):
+        """Return the current (or date-restricted) revisions that pertain to a given url."""
+        bb.error("compute_revisions() not supported by this fetcher: %s" % self.__class__)
+        return ['0']
 
     def setUrls(self, urls):
         self.__urls = urls
diff -Nru bitbake-1.6.6-clean/lib/bb/fetch/svn.py bitbake-1.6.6-om2/lib/bb/fetch/svn.py
--- bitbake-1.6.6-clean/lib/bb/fetch/svn.py	2007-02-16 12:21:44.000000000 +0100
+++ bitbake-1.6.6-om2/lib/bb/fetch/svn.py	2007-03-05 23:27:08.000000000 +0100
@@ -38,6 +38,10 @@
 
 class Svn(Fetch):
     """Class to fetch a module or modules from svn repositories"""
+    def __init__(self, *args, **kwargs):
+        super(Svn, self).__init__(*args, **kwargs)
+        self._cached_revisions = {}
+    
     def supports(url, d):
         """Check to see if a given url can be fetched with svn.
            Expects supplied url in list form, as outputted by bb.decodeurl().
@@ -46,31 +50,76 @@
         return type in ['svn']
     supports = staticmethod(supports)
 
-    def localpath(url, d):
+    def localpath(self, url, d):
         (type, host, path, user, pswd, parm) = bb.decodeurl(data.expand(url, d))
         if "localpath" in parm:
 #           if user overrides local path, use it.
             return parm["localpath"]
+        
+        dldir = data.getVar("DL_DIR", d, 1)
+        tarfn = self.compute_filename(url, d);
+        
+        return os.path.join(dldir, tarfn)
 
+    def compute_filename(self, url, d):
+        (type, host, path, user, pswd, parm) = bb.decodeurl(data.expand(url, d))
+        
         if not "module" in parm:
             raise MissingParameterError("svn method needs a 'module' parameter")
         else:
             module = parm["module"]
+        
         if 'rev' in parm:
             revision = parm['rev']
         else:
             revision = ""
+        
+        if self._cached_revisions.has_key(url):
+            revision = self._cached_revisions[url]
+        else:
+            date = Fetch.getSRCDate(d)
+            
+            if 'srcdate' in parm:
+                date = parm['srcdate']
+
+        if revision:
+            date = ""
+
+        return data.expand('%s_%s_%s_%s_%s.tar.gz' % ( module.replace('/', '.'), host, path.replace('/', '.'), revision, date), d)
+    
+    def compute_revisions(self, url, d):
+        (type, host, path, user, pswd, parm) = bb.decodeurl(data.expand(url, d))
+
+        if not "module" in parm:
+            raise MissingParameterError("svn method needs a 'module' parameter")
+        else:
+            module = parm["module"]
+
+        if "proto" in parm:
+            proto = parm["proto"]
+        else:
+            proto = "svn"
+
+        svnroot = host + path
+        svnpath = "%s://%s/%s" % (proto, svnroot, module)
 
         date = Fetch.getSRCDate(d)
 
-        if 'srcdate' in parm:
-            date = parm['srcdate']
+        ## FIXME raise exception when the svn binary doesn't support remote query
+        # Obtain current repository revision
+        if date == "now":
+            svngetrevcmd = "LANG= LC_ALL= svn info %s | grep \^'Last Changed Rev' | cut -d':' -f2" % (svnpath)
+        else:
+            svngetrevcmd = "LANG= LC_ALL= svn info -r {%s} %s | grep \^'Last Changed Rev' | cut -d':' -f2" % (date, svnpath)
+            
+        stdout_handle = os.popen(svngetrevcmd, "r")
+        revision = stdout_handle.read()
+        stdout_handle.close()
+        revision = revision.strip()
 
-        if revision:
-            date = ""
+        self._cached_revisions[url] = revision
+        return [revision]
 
-        return os.path.join(data.getVar("DL_DIR", d, 1),data.expand('%s_%s_%s_%s_%s.tar.gz' % ( module.replace('/', '.'), host, path.replace('/', '.'), revision, date), d))
-    localpath = staticmethod(localpath)
 
     def go(self, d, urls = []):
         """Fetch urls"""
@@ -131,11 +180,15 @@
             else:
                 proto = "svn"
 
+            if self._cached_revisions.has_key(loc):
+                revision = self._cached_revisions[loc]
+                date = ""
+            
             svn_rsh = None
             if proto == "svn+ssh" and "rsh" in parm:
                 svn_rsh = parm["rsh"]
 
-            tarfn = data.expand('%s_%s_%s_%s_%s.tar.gz' % (module.replace('/', '.'), host, path.replace('/', '.'), revision, date), localdata)
+            tarfn = self.compute_filename(loc, d)
             data.setVar('TARFILES', dlfile, localdata)
             data.setVar('TARFN', tarfn, localdata)
 
