This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
cvs2git [2012-06-23 11:16] glen |
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 ===== | ||
- | ==== actions map ==== | + | ==== add new package ==== |
- | ^ Action ^ Before (CVS) ^ After (Git) ^ | + | * CVS: ''../builder -a PKG'' or ''cvs add PKGDIR'' |
- | | add new package | ''../builder -a PKG'' or ''cvs add PKGDIR'' | | | + | * GIT: ''builder -a PKG'' or ''slug.py init PKG'' |
- | | rename package | send rename request to cvsadmin@ | | | + | |
- | | 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'' | | + | ==== rename package ==== |
- | | 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> | | + | * CVS: send rename request to cvsadmin@ |
- | | checkin all changes | <code>cvs ci</code> | <code>git commit -a; git push</code> | | + | * GIT: ''ssh git@git.pld-linux.org move PKG1 PKG2'' |
- | | find string from all packages | <code>grep -r oauth_ SPECS</code> | | | + | |
- | | list all pkgs | <code>cvs ls packages</code> | | | + | ==== delete package ==== |
- | | 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> | | + | * CVS: remove all sources from cvs |
- | | convert last autotag into branch | <code>./builder -T ICU_4_8 -r auto-th-xxx icu.spec | + | * 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 | ./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> | | | + | 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> |