User Tools

Site Tools


cvs2git

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
cvs2git [2012-07-03 12:25]
draenog [Table]
cvs2git [2014-03-29 18:56] (current)
glen fix double slash issues
Line 1: Line 1:
 +====== CVS to GIT cheatsheet ======
 +
 ===== Changes to Developer ===== ===== Changes to Developer =====
  
-First you should get yourself git based tools. +First you should get yourself git based tools
-  - **builder** : FIXME should we build package ​here? +<​code>​ 
-  - ...+poldek --up -u rpm-build-tools 
 +mv rpm rpm.cvs 
 +builder --init-rpm-dir 
 +</​code>​ 
 + 
 +===== Actions ===== 
 + 
 +==== add new package ==== 
 + 
 +  ​* CVS: ''​../​builder ​-a PKG''​ or ''​cvs add PKGDIR''​ 
 +  ​GIT: ''​builder ​-a PKG''​ or ''​slug.py init PKG''​ 
 + 
 +==== rename package ==== 
 + 
 +  ​CVS: send rename request to cvsadmin@ ​                                                                                                                   
 +  ​GIT''​ssh git@git.pld-linux.org move PKG1 PKG2''​ 
 + 
 +==== delete ​package ​==== 
 + 
 +  ​* CVS: remove all sources from cvs                                                                                                                         
 +  * GIT: ask admin to run ''​ssh git@git.pld-linux.org trash PKG''​ 
 + 
 + 
 +==== update from remote ====  
 + 
 +  * CVS: ''​cvs up''​ 
 +  * GIT: ''​%%git pull --rebase%%''​ 
 + 
 +==== checkin single file ====  
 + 
 +  * CVS: ''​cvs ci file.foo''​ 
 +  * GIT: ''​git add file.foo; git commit; git push''​ 
 + 
 + 
 +==== checkin all changes ==== 
 + 
 +  * CVS: ''​cvs ci''​ 
 +  * GIT: ''​git commit -a; git push''​ 
 + 
 +==== find string from all packages ====  
 + 
 +  * CVS: ''​grep -r oauth_ SPECS''​ 
 +  * GIT: ''​slug.py checkout -b BRANCH; grep */​*.spec''​ 
 + 
 +====  list all pkgs ==== 
 + 
 +  * CVS: ''​cvs ls packages''​ 
 +  * GIT: ''​slug.py list''​ 
 + 
 +==== see old patches ==== 
 + 
 +  * CVS: look into ''​Attic/''​ in cvsweb 
 +  * GIT: ''​%%git log --pretty=format:​ --name-only --diff-filter=D%%''​ 
 + 
 +==== restore old removed file ====
  
 +  * CVS: look into ''​Attic/''​ in cvsweb and \\ ''​cvs up -jHEAD -j$DEAD_REV''​ and commit ​                                                                    
 +  * GIT: 
 +  - get sha: ''​%%git log -- FILE%%''​
 +  - get contents: ''​git show HASH:​FILE''​
  
-==== actions map ====+==== convert last autotag into branch ​==== 
  
-^ Action ​                           ^ Before (CVS)                                                                                                                                       ^ After (Git)                                                                             ^ +  * CVS: <​code>​./​builder -T ICU_4_8 -r auto-th-xxx icu.spec 
-| add new package ​                  | ''​../​builder -a PKG''​ or ''​cvs add PKGDIR'' ​                                                                                                       | <​code>​builder -a PKG</​code>​ or <​code>​slug.py init PKG</​code> ​                           | +./builder -g -r ICU_4_8 icu.spec 
-| rename package ​                   | send rename request to cvsadmin@ ​                                                                                                                  | <​code>​slug.py move PKG1 PKG2</​code> ​                                                    | +cvs tag -b -F ICU_4_8 icu.spec 
-| delete package ​                   | remove all sources from cvs                                                                                                                        | ask admin to run<​code>​ssh git@pld-linux.org trash PKG</​code> ​                           | +cvs ci -m '- ...' icu.spec</​code>  ​
-| update from remote ​               | <​code>​cvs up</​code> ​                                                                                                                               | <​code>​git pull --rebase</​code> ​                                                         | +
-| checkin single file               | <​code>​cvs ci file.foo</​code> ​                                                                                                                      | <​code>​git add file.foo; git commit; git push</​code> ​                                    | +
-| checkin all changes ​              | <​code>​cvs ci</​code> ​                                                                                                                               | <​code>​git commit -a; git push</​code> ​                                                   | +
-| find string from all packages ​    | <​code>​grep -r oauth_ SPECS</​code> ​                                                                                                                 |                                                                                         | +
-| list all pkgs                     | <​code>​cvs ls packages</​code> ​                                                                                                                      ​| ​                                                                                        | +
-| see old patches ​                  | look into ''​Attic/''​ in cvsweb ​                                                                                                                    | <​code>​git log --pretty=format--name-only --diff-filter=D</​code> ​                      | +
-| restore old removed file          | look into ''​Attic/''​ in cvsweb and \\ ''​cvs up -jHEAD -j$DEAD_REV''​ and commit ​                                                                    | 1. get sha:<​code>​git log -- FILE</​code>​2. get contents:<​code>​git show HASH:​FILE</​code> ​ | +
-| convert last autotag into branch ​ | <​code>​./​builder -T ICU_4_8 -r auto-th-xxx icu.spec./​builder -g -r ICU_4_8 icu.speccvs ​tag -b -F ICU_4_8 icu.speccvs ​ci -m '- ...' icu.spec</​code>  ​|                                                                                         |+
  
 +  * GIT: <​code>​./​builder -B ICU_4_8 -r   ​auto-th-xxx icu.spec
 +git push origin ICU_4_8
 +git checkout ICU_4_8</​code>​
  
 +====  delete remote branch ==== 
 +  * CVS: <​code>​cvs branch -d BRANCH</​code>​
 +  * GIT: <​code>​git push origin :​BRANCH</​code>​
cvs2git.1341311157.txt.gz · Last modified: 2012-07-03 12:25 by draenog