From 0ffd75ad931413b68d106897bedbcd7f87114c14 Mon Sep 17 00:00:00 2001 From: Holger Hans Peter Freyther Date: Mon, 3 Nov 2008 12:55:17 +0000 Subject: [svn] Add @rev to svn checkout command Patch by borgcube@gmx.li Svn tries to be smart about revisions. So, when you check out an older revision of a file it goes to the latest revision (HEAD) and tries to go back to the old file. In this case it was impossible, since the whole thing was moved outside of svn's scope, so svn can't find the file in the HEAD revision. Svn treats this situation as an exception and provides the "peg-revision"-syntax for that. So where you would normally do svn co -r1337 http://url/to/somewhere/module module you would now have to do svn co -r1337 http://url/to/somewhere/module@1337 module, the @1337 telling svn to go start looking at revision 1337 instead of HEAD. --- ChangeLog | 1 + lib/bb/fetch/svn.py | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 5b46ec265..37926c2c7 100644 --- a/ChangeLog +++ b/ChangeLog @@ -60,6 +60,7 @@ Changes in BitBake 1.8.x: used instead of the internal bitbake one. Alternatively, BB_ENV_EXTRAWHITE can be used to extend the internal whitelist. - Perforce fetcher fix to use commandline options instead of being overriden by the environment + - use @rev when doing a svn checkout Changes in BitBake 1.8.10: - Psyco is available only for x86 - do not use it on other architectures. diff --git a/lib/bb/fetch/svn.py b/lib/bb/fetch/svn.py index 5e5b31b3a..aead1629b 100644 --- a/lib/bb/fetch/svn.py +++ b/lib/bb/fetch/svn.py @@ -114,13 +114,15 @@ class Svn(Fetch): if command is "info": svncmd = "%s info %s %s://%s/%s/" % (basecmd, " ".join(options), proto, svnroot, ud.module) else: + suffix = "" if ud.revision: options.append("-r %s" % ud.revision) + suffix = "@%s" % (ud.revision) elif ud.date: options.append("-r {%s}" % ud.date) if command is "fetch": - svncmd = "%s co %s %s://%s/%s %s" % (basecmd, " ".join(options), proto, svnroot, ud.module, ud.module) + svncmd = "%s co %s %s://%s/%s%s %s" % (basecmd, " ".join(options), proto, svnroot, ud.module, suffix, ud.module) elif command is "update": svncmd = "%s update %s" % (basecmd, " ".join(options)) else: -- cgit 1.2.3-korg