Changes between Version 11 and Version 12 of GitMirror
- Timestamp:
- 02/26/09 18:14:00 (4 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
GitMirror
v11 v12 25 25 This needs to be done only once. 26 26 {{{ 27 git clone git://github.com/pv/scipy-svn.git scipy.git27 git clone --origin svn git://github.com/pv/scipy-svn.git scipy.git 28 28 }}} 29 29 This will take some time, as the repository (ca. 30 MB) contains Scipy's whole history. 30 30 31 Then, get the SVN branch pointers. First, edit `scipy.git/.git/config` and change32 the `remote "origin"` section to look like this:33 {{{34 [remote "origin"]35 url = git://github.com/pv/scipy-svn.git36 fetch = +refs/remotes/*:refs/remotes/*37 fetch = +refs/heads/*:refs/remotes/origin/*38 }}}39 Then run40 {{{41 git fetch42 }}}43 `XXX: this is mildly ugly, we can investigate if it's possible to streamline this`44 45 31 Now you can do 46 32 {{{ 47 git log trunk33 git log svn/trunk 48 34 }}} 49 35 to view the commit log of Scipy's trunk. Or, list branches and tags in SVN: … … 57 43 to commit your changes back to SVN. 58 44 {{{ 59 git-svn init -s http://svn.scipy.org/svn/scipy45 git-svn init -s --prefix=svn/ http://svn.scipy.org/svn/scipy 60 46 git-svn rebase -l 61 47 }}} … … 72 58 {{{ 73 59 # Make a branch 'work' based on trunk, and switch to it 74 git checkout -b work trunk60 git checkout -b work svn/trunk 75 61 }}} 76 62 You can list available branches with … … 102 88 If you haven't published your changes, you can just use rebase: 103 89 {{{ 104 git rebase trunk90 git rebase svn/trunk 105 91 }}} 106 92 If there are conflicts, it will ask you to resolve them. After … … 111 97 An alternative is merging, which does not rewrite history, 112 98 {{{ 113 git merge trunk99 git merge svn/trunk 114 100 }}} 115 101 `XXX: but committing changes back using git-svn may be more hairy if there are merges? Also, you get duplicate commits, since SVN cannot contain merge commits` … … 160 146 Examine what was done there: 161 147 {{{ 162 git log trunk..163 git diff trunk148 git log svn/trunk.. 149 git diff svn/trunk 164 150 git show bb21c 165 151 git show 7f738 … … 213 199 git svn dcommit -n 214 200 }}} 201 202 If you want to view a diff of the changes to be committed, use this script: 203 {{{ 204 #!/bin/bash 205 git svn dcommit -n | { read; while read X; do git $X -M -C --pretty --stat -p; done } | less 206 }}} 207 Save it somewhere in your `$PATH` as `git-show-dcommit` and make it executable. 208 Then, you can do `git show-dcommit` to view what is to be committed.
