Changes between Version 11 and Version 12 of GitMirror

Show
Ignore:
Timestamp:
02/26/09 18:14:00 (4 years ago)
Author:
pv
Comment:

Update according to the cleaner git mirror branch layout

Legend:

Unmodified
Added
Removed
Modified
  • GitMirror

    v11 v12  
    2525This needs to be done only once. 
    2626{{{ 
    27 git clone git://github.com/pv/scipy-svn.git scipy.git 
     27git clone --origin svn git://github.com/pv/scipy-svn.git scipy.git 
    2828}}} 
    2929This will take some time, as the repository (ca. 30 MB) contains Scipy's whole history. 
    3030 
    31 Then, get the SVN branch pointers. First, edit `scipy.git/.git/config` and change 
    32 the `remote "origin"` section to look like this: 
    33 {{{ 
    34 [remote "origin"] 
    35         url = git://github.com/pv/scipy-svn.git 
    36         fetch = +refs/remotes/*:refs/remotes/* 
    37         fetch = +refs/heads/*:refs/remotes/origin/* 
    38 }}} 
    39 Then run 
    40 {{{ 
    41 git fetch 
    42 }}} 
    43 `XXX: this is mildly ugly, we can investigate if it's possible to streamline this` 
    44  
    4531Now you can do 
    4632{{{ 
    47 git log trunk 
     33git log svn/trunk 
    4834}}} 
    4935to view the commit log of Scipy's trunk. Or, list branches and tags in SVN: 
     
    5743to commit your changes back to SVN. 
    5844{{{ 
    59 git-svn init -s http://svn.scipy.org/svn/scipy 
     45git-svn init -s --prefix=svn/ http://svn.scipy.org/svn/scipy 
    6046git-svn rebase -l 
    6147}}} 
     
    7258{{{ 
    7359# Make a branch 'work' based on trunk, and switch to it 
    74 git checkout -b work trunk 
     60git checkout -b work svn/trunk 
    7561}}} 
    7662You can list available branches with 
     
    10288If you haven't published your changes, you can just use rebase: 
    10389{{{ 
    104 git rebase trunk 
     90git rebase svn/trunk 
    10591}}} 
    10692If there are conflicts, it will ask you to resolve them. After 
     
    11197An alternative is merging, which does not rewrite history, 
    11298{{{ 
    113 git merge trunk 
     99git merge svn/trunk 
    114100}}} 
    115101`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` 
     
    160146Examine what was done there: 
    161147{{{ 
    162 git log trunk.. 
    163 git diff trunk 
     148git log svn/trunk.. 
     149git diff svn/trunk 
    164150git show bb21c 
    165151git show 7f738 
     
    213199git svn dcommit -n 
    214200}}} 
     201 
     202If you want to view a diff of the changes to be committed, use this script: 
     203{{{ 
     204#!/bin/bash 
     205git svn dcommit -n | { read; while read X; do git $X  -M -C --pretty --stat -p; done } | less 
     206}}} 
     207Save it somewhere in your `$PATH` as `git-show-dcommit` and make it executable. 
     208Then, you can do `git show-dcommit` to view what is to be committed.