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-30 20:50]
glen rpm -i (via poldek -i) is evil, never do that unless you know what you're doing
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:
 <​code>​ <​code>​
-poldek -u rpm-build-tools-4.5-3 git-core+poldek ​--up -u rpm-build-tools
 mv rpm rpm.cvs mv rpm rpm.cvs
 builder --init-rpm-dir builder --init-rpm-dir
 </​code>​ </​code>​
  
 +===== Actions =====
  
 +==== add new package ====
  
-==== actions map ====+  * CVS: ''​../​builder -a PKG''​ or ''​cvs add PKGDIR''​ 
 +  * GIT: ''​builder -a PKG''​ or ''​slug.py init PKG''​
  
-^ Action ​                           ^ Before (CVS)                                                                                                                                       ^ After (Git)                                                                             ^ +==== rename ​package ​==== 
-| add new package ​                  | <​code>​../​builder -a PKG</​code>​ or <​code>​cvs add PKGDIR</​code> ​                                                                                                      | <​code>​builder -a PKG</​code>​ or <​code>​slug.py init PKG</​code> ​                           | + 
-| rename package ​                   | send rename request to cvsadmin@ ​                                                                                                                  | <​code>​ssh git@git.pld-linux.org move PKG1 PKG2</​code> ​                                                    | +  * CVS: send rename request to cvsadmin@ ​                                                                                                                   
-delete package ​                   ​| ​remove all sources from cvs                                                                                                                        ​ask admin to run<​code>​ssh git@git.pld-linux.org trash PKG</​code> ​                           | +  * GIT: ''​ssh git@git.pld-linux.org move PKG1 PKG2''​ 
-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> ​                                    | +==== delete package ​==== 
-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> ​                                                                                                                 | <​code>​slug.py checkout -b BRANCH; grep */*.spec</​code> ​                                                                                       | +  * CVS: remove all sources from cvs                                                                                                                        ​ 
-list all pkgs                     | <​code>​cvs ls packages</​code> ​                                                                                                                      ​|<​code>​slug.py list</​code> ​                                                                                      | +  * GIT: ask admin to run ''​ssh git@git.pld-linux.org trash PKG''​ 
-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+==== 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''​ 
 + 
 +==== convert last autotag into branch ​====  
 + 
 +  * CVS: <​code>​./​builder -T ICU_4_8 -r auto-th-xxx icu.spec
 ./builder -g -r ICU_4_8 icu.spec ./builder -g -r ICU_4_8 icu.spec
 cvs tag -b -F ICU_4_8 icu.spec cvs tag -b -F ICU_4_8 icu.spec
-cvs ci -m '- ...' icu.spec</​code>  ​|<​code>​./​builder -B ICU_4_8 -r   ​auto-th-xxx icu.spec +cvs ci -m '- ...' icu.spec</​code>  ​
-git push origin ICU_4_8 +
-git checkout ICU_4_8</​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.1343674228.txt.gz · Last modified: 2012-07-30 20:50 by glen