diff options
author | Richard Purdie <rpurdie@linux.intel.com> | 2007-07-25 23:43:45 +0000 |
---|---|---|
committer | Richard Purdie <rpurdie@linux.intel.com> | 2007-07-25 23:43:45 +0000 |
commit | 48cf1be534b40f217a1a088aa8c82415596cd96c (patch) | |
tree | 93f60a1bdf76655413078b9d0466e749bceddb71 /lib/bb/fetch | |
parent | 94822eb878957e9c0e94ae3c0c0999e34c34aa2a (diff) | |
download | bitbake-48cf1be534b40f217a1a088aa8c82415596cd96c.tar.gz |
svn.py: Add latest_revision and sortable_revison functions
Diffstat (limited to 'lib/bb/fetch')
-rw-r--r-- | lib/bb/fetch/svn.py | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/lib/bb/fetch/svn.py b/lib/bb/fetch/svn.py index 745f9d273..0672c69a9 100644 --- a/lib/bb/fetch/svn.py +++ b/lib/bb/fetch/svn.py @@ -153,3 +153,17 @@ class Svn(Fetch): pass raise t, v, tb + def latest_revision(self, url, ud, d): + output = runfetchcmd(self._buildsvncommand(ud, d, "info"), d, True) + + revision = None + for line in output.splitlines(): + if "Last Changed Rev" in line: + revision = line.split(":")[1].strip() + + return revision + + def sortable_revision(self, url, ud, d): + + return self.latest_revision(url, ud, d) + |