| | 1 | This page describes the format and usage of special URI's that can be used inside the SRC_URI field of a BepFile file. The purpose of which are to download source code from a version control system for use during the software build process. |
| | 2 | |
| | 3 | |
| | 4 | |
| | 5 | == Schema of the URI == |
| | 6 | |
| | 7 | {{{ |
| | 8 | type://[username[:password]@]hostname[:port]/path[#revision] |
| | 9 | }}} |
| | 10 | |
| | 11 | ''The username, password, port, and revision specifiers are optional.'' |
| | 12 | |
| | 13 | |
| | 14 | |
| | 15 | |
| | 16 | '''Supported version control types''' |
| | 17 | |
| | 18 | * cvs:// |
| | 19 | |
| | 20 | * svn:// |
| | 21 | |
| | 22 | * svn+http:// |
| | 23 | |
| | 24 | * svn+https:// |
| | 25 | |
| | 26 | * hg+http:// |
| | 27 | |
| | 28 | * hg+https:// |
| | 29 | |
| | 30 | * git:// |
| | 31 | |
| | 32 | * git+http:// |
| | 33 | |
| | 34 | * git+https:// |
| | 35 | |
| | 36 | |
| | 37 | |
| | 38 | |
| | 39 | '''The revision specifier''' |
| | 40 | |
| | 41 | For subversion this is a revision number. |
| | 42 | |
| | 43 | For mercurial and git this is any changeset, tag, or branch identifier. Usually you would want to use it to specify a changeset id though. |
| | 44 | |
| | 45 | For CVS this is a date specifier. Usually you would use MM/DD/YYYY, but it can be any format that CVS accepts. |
| | 46 | |
| | 47 | |
| | 48 | |
| | 49 | |
| | 50 | '''Notes for CVS''' |
| | 51 | |
| | 52 | The CVS schema is slightly different than the others. The path should also include the module name at the end and it will almost always need :pserver: just after the type specifier. |
| | 53 | |
| | 54 | {{{ |
| | 55 | cvs://:pserver:[username[:password]@]hostname[:port]/path/module[#date] |
| | 56 | }}} |
| | 57 | |
| | 58 | |
| | 59 | |
| | 60 | ---- |
| | 61 | |
| | 62 | |
| | 63 | |
| | 64 | == Subversion examples == |
| | 65 | |
| | 66 | |
| | 67 | |
| | 68 | Checking out the latest revision: |
| | 69 | |
| | 70 | {{{ |
| | 71 | SRC_URI="svn+http://svn.ruby-lang.org/repos/ruby/trunk" |
| | 72 | }}} |
| | 73 | |
| | 74 | |
| | 75 | Checking out a specific revision: |
| | 76 | |
| | 77 | {{{ |
| | 78 | SRC_URI="svn+http://svn.ruby-lang.org/repos/ruby/trunk#26849" |
| | 79 | }}} |
| | 80 | |
| | 81 | |
| | 82 | |
| | 83 | == Mercurial examples == |
| | 84 | |
| | 85 | |
| | 86 | |
| | 87 | Cloning the tip of a repository: |
| | 88 | |
| | 89 | {{{ |
| | 90 | SRC_URI="hg+http://bitbucket.org/durin42/hgsubversion/" |
| | 91 | }}} |
| | 92 | |
| | 93 | |
| | 94 | Cloning a specific changeset: |
| | 95 | |
| | 96 | {{{ |
| | 97 | SRC_URI="hg+http://bitbucket.org/durin42/hgsubversion/#9eb6bf2be1e7" |
| | 98 | }}} |
| | 99 | |
| | 100 | |
| | 101 | |
| | 102 | == Git examples == |
| | 103 | |
| | 104 | |
| | 105 | |
| | 106 | Cloning a specific changeset: |
| | 107 | |
| | 108 | {{{ |
| | 109 | SRC_URI="git://cmake.org/cmake.git#c6fdff2b223d8527600a7df13638cd0258db4de7" |
| | 110 | }}} |
| | 111 | |
| | 112 | |
| | 113 | |
| | 114 | == CVS examples == |
| | 115 | |
| | 116 | |
| | 117 | |
| | 118 | Checking out the HEAD of a repository(with password): |
| | 119 | |
| | 120 | '' This is with a username of 'anonymous', password of 'cmake', and module 'CMake' '' |
| | 121 | |
| | 122 | {{{ |
| | 123 | SRC_URI="cvs://:pserver:anonymous:cmake@www.cmake.org:/cvsroot/CMake/CMake" |
| | 124 | }}} |
| | 125 | |
| | 126 | |
| | 127 | Checking out a specific date of a repository: |
| | 128 | |
| | 129 | '' This is with a username of 'anonymous', password of 'cmake', and module 'CMake' '' |
| | 130 | |
| | 131 | {{{ |
| | 132 | SRC_URI="cvs://:pserver:anonymous:cmake@www.cmake.org:/cvsroot/CMake/CMake#4/14/2006" |
| | 133 | }}} |
| | 134 | |
| | 135 | |
| | 136 | Checking out the HEAD of a repository(with no password): |
| | 137 | |
| | 138 | '' This is with a username of 'anonymous', empty password, and module 'zsh' '' |
| | 139 | |
| | 140 | {{{ |
| | 141 | SRC_URI="cvs://:pserver:anonymous@zsh.cvs.sourceforge.net:/cvsroot/zsh/zsh" |
| | 142 | }}} |