diff -Nru bitbake-1.6.6-clean/lib/bb/fetch/git.py bitbake-1.6.6-om3/lib/bb/fetch/git.py
--- bitbake-1.6.6-clean/lib/bb/fetch/git.py	2007-02-16 12:21:44.000000000 +0100
+++ bitbake-1.6.6-om3/lib/bb/fetch/git.py	2007-03-08 22:05:26.000000000 +0100
@@ -48,6 +48,23 @@
     if myret != 0:
         raise FetchError("Git: %s failed" % pathcmd)
 
+def getgitoutput(cmd,d):
+
+    bb.debug(1, "Running %s" % cmd)
+
+    # Need to export PATH as git is likely to be in metadata paths 
+    # rather than host provided
+    pathcmd = 'export PATH=%s; %s' % (data.expand('${PATH}', d), cmd)
+
+    fp = os.popen(pathcmd)
+    result = fp.read()
+    myret = fp.close()
+
+    if myret is not None:
+        raise FetchError("Git: %s failed" % pathcmd)
+    
+    return result
+
 def gettag(parm):
     if 'tag' in parm:
         tag = parm['tag']
@@ -95,6 +112,18 @@
         return os.path.join(data.getVar("DL_DIR", d, 1), localfile(url, d))
 
     localpath = staticmethod(localpath)
+    
+    def compute_revisions(self, url, d):
+        (type, host, path, user, pswd, parm) = bb.decodeurl(data.expand(url, d))
+        
+        tag = gettag(parm)
+        proto = getprotocol(parm)
+        
+        reference = getgitoutput("git ls-remote %s://%s%s %s" % (proto, host, path, tag),d)
+        
+        hash = reference.split()[0]
+        
+        return [hash]
 
     def go(self, d, urls = []):
         """Fetch urls"""
Dateien bitbake-1.6.6-clean/lib/bb/fetch/git.pyc und bitbake-1.6.6-om3/lib/bb/fetch/git.pyc sind verschieden.
diff -Nru bitbake-1.6.6-clean/lib/bb/fetch/__init__.py bitbake-1.6.6-om3/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-om3/lib/bb/fetch/__init__.py	2007-03-06 00:47:25.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-om3/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-om3/lib/bb/fetch/svn.py	2007-03-06 01:57:51.000000000 +0100
@@ -35,9 +35,14 @@
 from   bb.fetch import Fetch
 from   bb.fetch import FetchError
 from   bb.fetch import MissingParameterError
+from   bb.fetch import QueryError
 
 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 +51,93 @@
         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 = ""
-
-        date = Fetch.getSRCDate(d)
-
-        if 'srcdate' in parm:
-            date = parm['srcdate']
+        
+        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 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)
+        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)
+
+        # Obtain current repository revision
+        if date == "now":
+            svngetrevcmd = "LANG= LC_ALL= svn info %s" % (svnpath)
+        else:
+            svngetrevcmd = "LANG= LC_ALL= svn info -r {%s} %s" % (date, svnpath)
+            
+        stdout_handle = os.popen(svngetrevcmd, "r")
+        output = stdout_handle.read()
+        
+        revision = None
+        for line in output.splitlines():
+            if "Last Changed Rev" in line:
+                revision = line.split(":")[1].strip()
+        
+        ## Returns None on success instead of 0
+        status =  stdout_handle.close() or 0
+        exitstatus, signal = status >> 8, status & 0xff
+        if signal and (revision is None or not revision.isdigit()):
+            ## svn was killed before returning the needed information
+            raise QueryError, "Command '%s' was killed with signal %i before returning the revision information" % signal
+        elif signal and revision is not None and revision.isdigit():
+            ## svn was killed, but the output is probably OK up to the "Last Changed Rev" line
+            pass
+        elif status != 0:
+            raise QueryError, "Nonzero exit from '%s': Either your svn binary doesn't support remote querying or failed for some other reason (e.g. network error)" % svngetrevcmd
+
+        if revision is None:
+            raise QueryError, "Output from '%s' not understood" % svngetrevcmd
+        
+        self._cached_revisions[url] = revision
+        return [revision]
+
 
     def go(self, d, urls = []):
         """Fetch urls"""
@@ -131,11 +198,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)
 
