| 7 | | Comparison with bzr / hg, problems of svn. |
| 8 | | |
| 9 | | = How to do the migration = |
| 10 | | |
| 11 | | The migration from svn repository to git repository should keep as mush information from svn as possible: history, tags and branches. |
| 12 | | |
| 13 | | == Tool for the migration == |
| 14 | | |
| 15 | | svn-all-fast-export: see http://repo.or.cz/w/svn-all-fast-export.git |
| 16 | | |
| 17 | | This is an exporter coded by KDE people to handle KDE migration - thus, it can certainly handle numpy and scipy. It can skip some branches, or paths outside the usual trunk/branches/tags (f2py-research, for example), and export svn "tags" as real tags. |
| 18 | | |
| 19 | | == usage == |
| 20 | | |
| 21 | | For numpy, the following seems to work - it ignores branches outside the /branches namespace, convert the tags. |
| 22 | | |
| 23 | | {{{ |
| 24 | | #! |
| 25 | | create repository myproject |
| 26 | | end repository |
| 27 | | |
| 28 | | match /trunk/ |
| 29 | | repository myproject |
| 30 | | branch master |
| 31 | | end match |
| 32 | | |
| 33 | | # Ignore extra 'repositories' which are not numpy code, but were in numpy |
| 34 | | # repository. |
| 35 | | match /f2py-research/ |
| 36 | | end match |
| 37 | | match /vendor/ |
| 38 | | end match |
| 39 | | match /numpy.sunperf/ |
| 40 | | end match |
| 41 | | match /cleaned_math_config/ |
| 42 | | end match |
| 43 | | match /numpy-docs/ |
| 44 | | end match |
| 45 | | |
| 46 | | # Take usual svn branches |
| 47 | | match /branches/([^/]+)/ |
| 48 | | repository myproject |
| 49 | | branch \1 |
| 50 | | end match |
| 51 | | |
| 52 | | # This rule will create tags that don't exist in any of the |
| 53 | | # branches. It's not what you want. |
| 54 | | # See the merged-branches-tags.rules file |
| 55 | | match /tags/([^/]+)/ |
| 56 | | repository myproject |
| 57 | | branch refs/tags/\1 |
| 58 | | end match |
| 59 | | }}} |
| | 109 | |
| | 110 | = Rationale for git = |
| | 111 | |
| | 112 | Comparison with bzr / hg, problems of svn. |
| | 113 | |
| | 114 | = How to do the migration = |
| | 115 | |
| | 116 | The migration from svn repository to git repository should keep as mush information from svn as possible: history, tags and branches. |
| | 117 | |
| | 118 | == Tool for the migration == |
| | 119 | |
| | 120 | svn-all-fast-export: see http://repo.or.cz/w/svn-all-fast-export.git |
| | 121 | |
| | 122 | This is an exporter coded by KDE people to handle KDE migration - thus, it can certainly handle numpy and scipy. It can skip some branches, or paths outside the usual trunk/branches/tags (f2py-research, for example), and export svn "tags" as real tags. |
| | 123 | |
| | 124 | == usage == |
| | 125 | |
| | 126 | For numpy, the following seems to work - it ignores branches outside the /branches namespace, convert the tags. |
| | 127 | |
| | 128 | {{{ |
| | 129 | create repository myproject |
| | 130 | end repository |
| | 131 | |
| | 132 | match /trunk/ |
| | 133 | repository myproject |
| | 134 | branch master |
| | 135 | end match |
| | 136 | |
| | 137 | # Ignore extra 'repositories' which are not numpy code, but were in numpy |
| | 138 | # repository. |
| | 139 | match /f2py-research/ |
| | 140 | end match |
| | 141 | match /vendor/ |
| | 142 | end match |
| | 143 | match /numpy.sunperf/ |
| | 144 | end match |
| | 145 | match /cleaned_math_config/ |
| | 146 | end match |
| | 147 | match /numpy-docs/ |
| | 148 | end match |
| | 149 | |
| | 150 | # Take usual svn branches |
| | 151 | match /branches/([^/]+)/ |
| | 152 | repository myproject |
| | 153 | branch \1 |
| | 154 | end match |
| | 155 | |
| | 156 | # This rule will create tags that don't exist in any of the |
| | 157 | # branches. It's not what you want. |
| | 158 | # See the merged-branches-tags.rules file |
| | 159 | match /tags/([^/]+)/ |
| | 160 | repository myproject |
| | 161 | branch refs/tags/\1 |
| | 162 | end match |
| | 163 | }}} |