Changes between Version 7 and Version 8 of GitMigrationProposal

Show
Ignore:
Timestamp:
03/15/09 06:16:20 (4 years ago)
Author:
cdavid
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • GitMigrationProposal

    v7 v8  
    33[[PageOutline]] 
    44 
    5 = Rationale for git =  
    65 
    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 }}} 
    606 
    617= Common scenario =  
     
    10450git config alias.st status 
    10551}}} 
     52 
     53=== Getting help from the command line === 
     54 
     55Git documentation is pretty massive - it can definitely be difficult to apprehend. Once you have a good grasp of the basic scenario, you should familiarize yourself with git from the git tutorial, and git for svn users. Only then will you be able to start reading the git included help.  
    10656 
    10757== Scenario 1: getting the numpy source code == 
     
    157107 
    158108No, don't use git reset. Git reset can be used to revert changes, but can be dangerous to use, as it can also remove *commits*, not just changes. git reset is only useful for advanced usage of git. Use git stash or git co, not git reset. 
     109 
     110= Rationale for git =  
     111 
     112Comparison with bzr / hg, problems of svn. 
     113 
     114= How to do the migration =  
     115 
     116The 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 
     120svn-all-fast-export: see http://repo.or.cz/w/svn-all-fast-export.git 
     121 
     122This 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 
     126For numpy, the following seems to work - it ignores branches outside the /branches namespace, convert the tags. 
     127 
     128{{{ 
     129create repository myproject 
     130end repository 
     131 
     132match /trunk/ 
     133  repository myproject 
     134  branch master 
     135end match 
     136 
     137# Ignore extra 'repositories' which are not numpy code, but were in numpy 
     138# repository. 
     139match /f2py-research/ 
     140end match 
     141match /vendor/ 
     142end match 
     143match /numpy.sunperf/ 
     144end match 
     145match /cleaned_math_config/ 
     146end match 
     147match /numpy-docs/ 
     148end match 
     149 
     150# Take usual svn branches 
     151match /branches/([^/]+)/ 
     152  repository myproject 
     153  branch \1 
     154end 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 
     159match /tags/([^/]+)/ 
     160  repository myproject 
     161  branch refs/tags/\1 
     162end match 
     163}}}