diff options
author | Holger Hans Peter Freyther <zecke@selfish.org> | 2008-11-03 12:50:35 +0000 |
---|---|---|
committer | Holger Hans Peter Freyther <zecke@selfish.org> | 2008-11-03 12:50:35 +0000 |
commit | 42e57e467b8334230436f24dc4bdfff64b52d2b3 (patch) | |
tree | b77f3dae851755d27b77c230582b4342584c043d | |
parent | 58fe5ad52d94e26500fd1d3adb1a195d2703f2b0 (diff) | |
download | bitbake-contrib-42e57e467b8334230436f24dc4bdfff64b52d2b3.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-- | ChangeLog | 1 | ||||
-rw-r--r-- | lib/bb/fetch/svn.py | 4 |
2 files changed, 4 insertions, 1 deletions
@@ -156,6 +156,7 @@ Changes in Bitbake 1.9.x: to extend the internal whitelist. - Perforce fetcher fix to use commandline options instead of being overriden by the environment - bb.utils.prunedir can cope with symlinks to directoriees without exceptions + - use @rev when doing a svn checkout Changes in Bitbake 1.8.0: - Release 1.7.x as a stable series 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: |