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-06-20 08:36]
glen [Table] cleanup github specific parts
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 =====
  
-^ Action ​                        ^ Before (CVS)                                                                    ^ After (Git)                                                                                                   ^ +First you should get yourself git based tools: 
-add new package ​               ​| ​''​../​builder -a PKG''​ or ''​cvs add PKGDIR'' ​                                    |                                                                                                               | +<​code>​ 
-rename package ​                | send rename request to cvsadmin@ ​                                               ​| ​                                                                                                              | +poldek --up -u rpm-build-tools 
-delete package ​                | remove all sources from cvs                                                     | package should be pushed ​to ''​pld-linux-obsolete'' ​and Org Owner in github has to delete it in ''​pld-linux'' ​ | +mv rpm rpm.cvs 
-update from remote ​            | <​code>​cvs up</​code> ​                                                            | <​code>​git pull --rebase</​code> ​                                                                               | +builder --init-rpm-dir 
-checkin single file            | <​code>​cvs ci file.foo</​code> ​                                                   | <​code>​git add file.foo; git commit; git push</​code> ​                                                          | +</​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> ​                                              ​| ​                                                                                                              | +===== Actions ===== 
-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> ​                                            | +==== add new package ​==== 
-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> ​                       |+ 
 +  * 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''​ 
 + 
 +==== 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 
 +cvs tag -b -F ICU_4_8 icu.spec 
 +cvs 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.1340174182.txt.gz · Last modified: 2012-06-20 08:36 by glen