summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHolger Hans Peter Freyther <zecke@selfish.org>2008-11-03 12:55:17 +0000
committerHolger Hans Peter Freyther <zecke@selfish.org>2008-11-03 12:55:17 +0000
commit0ffd75ad931413b68d106897bedbcd7f87114c14 (patch)
tree61cb58297452505f55eb6c4c2011c5d7b4818050
parentb2bfdc9dd4ee61a4d8e9f965ed1002880dc8568d (diff)
downloadbitbake-0ffd75ad931413b68d106897bedbcd7f87114c14.tar.gz
[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.
-rw-r--r--ChangeLog1
-rw-r--r--lib/bb/fetch/svn.py4
2 files changed, 4 insertions, 1 deletions
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: