Migration from CVS to SVN: Difference between revisions
(→Creating GRASS SVN repository: +grass7) |
|||
Line 89: | Line 89: | ||
→ '''[http://josef.fsv.cvut.cz/cgi-bin/viewcvs.cgi/?root=grass5svn grass5svn]''' | → '''[http://josef.fsv.cvut.cz/cgi-bin/viewcvs.cgi/?root=grass5svn grass5svn]''' | ||
Question: exclude selected branches (which one?) | '''Question:''' exclude selected branches/tags (which one?) | ||
==== Only grass6 ==== | ==== Only grass6 ==== | ||
Line 108: | Line 108: | ||
* [http://cvs2svn.tigris.org/faq.html#atticprob cvs2svn FAQ] | * [http://cvs2svn.tigris.org/faq.html#atticprob cvs2svn FAQ] | ||
Question: Remove Attic files | '''Question:''' Remove Attic files? | ||
rm -f grass-cvs/grass6/display/d.erase/Attic/main.c,v | rm -f grass-cvs/grass6/display/d.erase/Attic/main.c,v | ||
Line 202: | Line 202: | ||
--exclude="color_changes_20010502" \ | --exclude="color_changes_20010502" \ | ||
-s grass6svn grass-cvs/grass6 | -s grass6svn grass-cvs/grass6 | ||
'''Question:''' Exclude more tags (which)? | |||
Add other switches (e.g. <tt>--encoding</tt>) ?? | Add other switches (e.g. <tt>--encoding</tt>) ?? | ||
Line 268: | Line 270: | ||
-s grassnlsvn grass-cvs/newsletter | -s grassnlsvn grass-cvs/newsletter | ||
Question: exclude branch "markus" and tags "Final_version", "ready_for_grammar_spelling_correction" and "start" | '''Question:''' exclude branch "markus" and tags "Final_version", "ready_for_grammar_spelling_correction" and "start"? | ||
cvs2svn --use-cvs --no-default-eol \ | cvs2svn --use-cvs --no-default-eol \ | ||
Line 296: | Line 298: | ||
-s grassnlsvn grass-cvs/newsletter | -s grassnlsvn grass-cvs/newsletter | ||
Questions: | '''Questions:''' | ||
* Rename brach "markus"? | * Rename brach "markus"? | ||
* Rename tags "volume[1|2]_final" to "release_vol[1|2]"? | * Rename tags "volume[1|2]_final" to "release_vol[1|2]"? | ||
Line 313: | Line 315: | ||
... | ... | ||
Question: Remove Attic file? | '''Question:''' Remove Attic file? | ||
rm -f grass-cvs/web/bugtracking/Attic/index.html,v | rm -f grass-cvs/web/bugtracking/Attic/index.html,v | ||
Line 427: | Line 429: | ||
--existing-svnrepos \ | --existing-svnrepos \ | ||
-s grasssvn grass-cvs/web | -s grasssvn grass-cvs/web | ||
cvs2svn --use-cvs --no-default-eol \ | |||
--force-branch=releasebranch_6_2 \ | |||
--trunk-only \ | |||
--encoding="ASCII" \ | |||
--encoding="UTF-8" \ | |||
--encoding="ISO-8859-1" \ | |||
--trunk=grass7/trunk | |||
--existing-svnrepos \ | |||
-s grass-svn grass-cvs/grass6 | |||
→ '''[http://josef.fsv.cvut.cz/cgi-bin/viewcvs.cgi/?root=grass-svn grass-svn]''' | → '''[http://josef.fsv.cvut.cz/cgi-bin/viewcvs.cgi/?root=grass-svn grass-svn]''' |
Revision as of 09:03, 22 October 2007
This page contains notes related to GRASS code migration (planned) from CVS to SVN.
Basic
- The SVN command line interface is just like CVS, many tasks are identical- just change the program name from cvs to svn.
Gotchas
- cvs2svn is known to break binary files (images) which were not imported into the CVS with the -kb flag. Luckily Glynn fixed most of these some months ago.
- Files using keyword substitution, such as $Date$ in the description.html files, will have to have support for that enabled manually, once per file (or write a find routine with | xargs svn ...).
$ svn propset svn:keywords "Date" filename.txt $ svn commit
- how to maintain timestamps of files? We want to keep the last modification date, not the date of local download
GRASS CVS repository structure
/grass-cvs | +---/CVSROOT | +---/grass | +---/grass51 | +---/grass6 | +---/grass_doc | +---/libgrass | +---/newsletter | +---/programgrass50 | +---/web
Testing SVN repository
- grass/grass should be renamed to grass/grass5
Migrate all directories or only actively used (grass, grass6, newsletter, web)?
Proposed structure
/grass-svn | +---/grass5 | +---/branches | +---/tags | +---/trunk +---/grass6 | +---/braches | +---/tags | +---/trunk +---/newsletter +---/branches (???) | +---/tags | +---/trunk +---/web | +---/trunk
Copy of GRASS CVS repository
rsync -r --times --links --bwlimit=200 rsync://rsync.intevation.de/grass grass-cvs
→ cca 600 MB!
Creating GRASS SVN repository
Only grass5
cvs2svn --use-cvs --no-default-eol \ --encoding="ASCII" \ --encoding="UTF-8" \ --encoding="ISO-8859-1" \ -s grass5svn grass-cvs/grass
Question: exclude selected branches/tags (which one?)
Only grass6
cvs2svn --use-cvs --no-default-eol \ -s grass6svn grass-cvs/grass6 ... Error summary: ERROR: A CVS repository cannot contain both grass-cvs/grass6/display/d.erase/main.c,v and grass-cvs/grass6/display/d.erase/Attic/main.c,v ERROR: A CVS repository cannot contain both grass-cvs/grass6/general/g.mapsets/main_inter.c,v and grass-cvs/grass6/general/g.mapsets/Attic/main_inter.c,v ERROR: A CVS repository cannot contain both grass-cvs/grass6/include/gproj_api.h,v and grass-cvs/grass6/include/Attic/gproj_api.h,v ERROR: A CVS repository cannot contain both grass-cvs/grass6/visualization/nviz/src/getCat.c,v and grass-cvs/grass6/visualization/nviz/src/Attic/getCat.c,v Exited due to fatal error(s).
ERROR: A CVS repository cannot contain both grass-cvs/grass6/visualization/nviz/src/tmp,v and grass-cvs/grass6/visualization/nviz/src/Attic/tmp,v
Solution:
Question: Remove Attic files?
rm -f grass-cvs/grass6/display/d.erase/Attic/main.c,v rm -f grass-cvs/grass6/general/g.mapsets/Attic/main_inter.c,v rm -f grass-cvs/grass6/include/Attic/gproj_api.h,v rm -f grass-cvs/grass6/visualization/nviz/src/Attic/getCat.c,v rm -f grass-cvs/grass6/visualization/nviz/src/Attic/tmp,v
Restart
cvs2svn --use-cvs --no-default-eol \ -s grass6svn grass-cvs/grass6 ... ----- pass 2 (CollateSymbolsPass) ----- ERROR: It is not clear how the following symbols should be converted. Use --force-tag, --force-branch and/or --exclude to resolve the ambiguity. 'releasebranch_6_2' is a tag in 2 files, a branch in 5259 files and has commits in 1513 files
Restart
cvs2svn --use-cvs --no-default-eol \ --force-branch=releasebranch_6_2 \ -s grass6svn grass-cvs/grass6
Exclude all undocumented braches
cvs2svn --use-cvs --no-default-eol --force-branch=releasebranch_6_2 \ --exclude="grass" \ --exclude="grassreleasebranch_5_0_0" \ --exclude="markus" \ --exclude="releasebranch_14_august_2001_5_0_0" \ --exclude="releasebranch_26_april_2002_5_0_0" \ --exclude="releasebranch_5_4" \ --exclude="unlabeled.*" \ -s grass6svn1 grass-cvs/grass6 ... ----- pass 2 (CollateSymbolsPass) ----- Checking for blocked exclusions... ERROR: The branch 'markus' cannot be excluded because the following symbols depend on it: 'start' 'releasebranch_11_april_2001_5_0_0' ERROR: The branch 'grass' cannot be excluded because the following symbols depend on it: ...
cvs2svn --use-cvs --no-default-eol \ --force-branch=releasebranch_6_2 \ --exclude="grass" \ --exclude="grassreleasebranch_5_0_0" \ --exclude="markus" \ --exclude="releasebranch_14_august_2001_5_0_0" \ --exclude="releasebranch_26_april_2002_5_0_0" \ --exclude="releasebranch_5_4" \ --exclude="unlabeled.*" \ --exclude="devices_cleanup_20000420" \ --exclude="post_compare_glynn_head_2002_11_27" \ --exclude="post_compare_glynn_release_2002_11_27" \ --exclude="post_merge_head_2002_01_22" \ --exclude="post_sync_2002_01_22" \ --exclude="pre-curses-fix" \ --exclude="pre_merge_head_2002_01_22" \ --exclude="pre_merge_release_2002_01_22" \ --exclude="pre_sync_2001_10_31" \ --exclude="pre_sync_2002_01_17" \ --exclude="release_03_11_2003_grass5_0_3" \ --exclude="release_05_11_2004_grass5_4_0" \ --exclude="release_10_04_2003_grass5_0_2" \ --exclude="release_13_may_2002_grass5_0_0_pre4" \ --exclude="release_13_september_2001_grass5_0_0_pre2" \ --exclude="release_15_05_2004_grass5_3_0" \ --exclude="release_16_january_2002_grass5_0_0_pre3" \ --exclude="release_17_06_2004_grass5_7_0" \ --exclude="release_25_06_2002_grass5_0_0_pre5" \ --exclude="release_28_01_2003_grass5_0_1" \ --exclude="release_30_08_2002_grass5_0_0" \ --exclude="releasebranch_11_april_2001_5_0_0" \ --exclude="releasebranch_11_april_2001_5_0_0_DEAD" \ --exclude="releasebranch_500" \ --exclude="releasebranch_5_0_0" \ --exclude="release_grass500pre1_20_may_2001" \ --exclude="release_grass5beta10_7_december_2000" \ --exclude="release_grass5beta11_4_february_2001" \ --exclude="release_grass5beta11pre1_21_january_2001" \ --exclude="release_grass5beta11pre2_28_january_2001" \ --exclude="release_grass5beta6_16_feb_2000" \ --exclude="release_grass5beta7_20_april_2000" \ --exclude="release_grass5beta8_26_july_2000" \ --exclude="release_grass5beta9_6_december_2000" \ --exclude="start" \ --exclude="testbranch_5_0_0stable" \ --exclude="unlabeled-1.1.1.1.4" \ --exclude="unlabeled-1.1.1.1.6" \ --exclude="color_changes_20010502" \ -s grass6svn grass-cvs/grass6
Question: Exclude more tags (which)?
Add other switches (e.g. --encoding) ??
cvs2svn --use-cvs --no-default-eol \ --force-branch=releasebranch_6_2 \ --exclude="grass" \ --exclude="grassreleasebranch_5_0_0" \ --exclude="markus" \ --exclude="releasebranch_14_august_2001_5_0_0" \ --exclude="releasebranch_26_april_2002_5_0_0" \ --exclude="releasebranch_5_4" \ --exclude="unlabeled.*" \ --exclude="devices_cleanup_20000420" \ --exclude="post_compare_glynn_head_2002_11_27" \ --exclude="post_compare_glynn_release_2002_11_27" \ --exclude="post_merge_head_2002_01_22" \ --exclude="post_sync_2002_01_22" \ --exclude="pre-curses-fix" \ --exclude="pre_merge_head_2002_01_22" \ --exclude="pre_merge_release_2002_01_22" \ --exclude="pre_sync_2001_10_31" \ --exclude="pre_sync_2002_01_17" \ --exclude="release_03_11_2003_grass5_0_3" \ --exclude="release_05_11_2004_grass5_4_0" \ --exclude="release_10_04_2003_grass5_0_2" \ --exclude="release_13_may_2002_grass5_0_0_pre4" \ --exclude="release_13_september_2001_grass5_0_0_pre2" \ --exclude="release_15_05_2004_grass5_3_0" \ --exclude="release_16_january_2002_grass5_0_0_pre3" \ --exclude="release_17_06_2004_grass5_7_0" \ --exclude="release_25_06_2002_grass5_0_0_pre5" \ --exclude="release_28_01_2003_grass5_0_1" \ --exclude="release_30_08_2002_grass5_0_0" \ --exclude="releasebranch_11_april_2001_5_0_0" \ --exclude="releasebranch_11_april_2001_5_0_0_DEAD" \ --exclude="releasebranch_500" \ --exclude="releasebranch_5_0_0" \ --exclude="release_grass500pre1_20_may_2001" \ --exclude="release_grass5beta10_7_december_2000" \ --exclude="release_grass5beta11_4_february_2001" \ --exclude="release_grass5beta11pre1_21_january_2001" \ --exclude="release_grass5beta11pre2_28_january_2001" \ --exclude="release_grass5beta6_16_feb_2000" \ --exclude="release_grass5beta7_20_april_2000" \ --exclude="release_grass5beta8_26_july_2000" \ --exclude="release_grass5beta9_6_december_2000" \ --exclude="start" \ --exclude="testbranch_5_0_0stable" \ --exclude="unlabeled-1.1.1.1.4" \ --exclude="unlabeled-1.1.1.1.6" \ --exclude="color_changes_20010502" \ --encoding="ASCII" \ --encoding="UTF-8" \ --encoding="ISO-8859-1" \ -s grass6svn grass-cvs/grass6
Only newsletter
cvs2svn --use-cvs --no-default-eol \ --encoding="ASCII" \ --encoding="UTF-8" \ --encoding="ISO-8859-1" \ -s grassnlsvn grass-cvs/newsletter
Question: exclude branch "markus" and tags "Final_version", "ready_for_grammar_spelling_correction" and "start"?
cvs2svn --use-cvs --no-default-eol \ --exclude="markus" \ --exclude="Final_version" \ --exclude="ready_for_grammar_spelling_correction" \ --exclude="start" \ --encoding="ASCII" \ --encoding="UTF-8" \ --encoding="ISO-8859-1" \ -s grassnlsvn grass-cvs/newsletter ... Checking for blocked exclusions... ERROR: The branch 'markus' cannot be excluded because the following symbols depend on it: 'volume1_final' ...
Cannot exclude branch "markus"
cvs2svn --use-cvs --no-default-eol \ --exclude="Final_version" \ --exclude="ready_for_grammar_spelling_correction" \ --exclude="start" \ --encoding="ASCII" \ --encoding="UTF-8" \ --encoding="ISO-8859-1" \ -s grassnlsvn grass-cvs/newsletter
Questions:
- Rename brach "markus"?
- Rename tags "volume[1|2]_final" to "release_vol[1|2]"?
Only web
cvs2svn --use-cvs --no-default-eol \
--encoding="ASCII" \ --encoding="UTF-8" \ --encoding="ISO-8859-1" \ -s grasswebsvn grass-cvs/web ... ERROR: A CVS repository cannot contain both grass-cvs/web/bugtracking/index.html,v and grass-cvs/web/bugtracking/Attic/index.html,v ...
Question: Remove Attic file?
rm -f grass-cvs/web/bugtracking/Attic/index.html,v
Question: Ignore branches ("markus") and tags ("start")?
cvs2svn --use-cvs --no-default-eol \ --trunk-only \ --encoding="ASCII" \ --encoding="UTF-8" \ --encoding="ISO-8859-1" \ -s grasswebsvn grass-cvs/web
grass6 HEAD → grass7
cvs2svn --use-cvs --no-default-eol \ --force-branch=releasebranch_6_2 \ --trunk-only \ --encoding="ASCII" \ --encoding="UTF-8" \ --encoding="ISO-8859-1" \ -s grass7svn grass-cvs/grass6
Whole grass repository (selected directories)
cvs2svn --use-cvs --no-default-eol \ --encoding="ASCII" \ --encoding="UTF-8" \ --encoding="ISO-8859-1" \ --branches=grass5/branches \ --tags=grass5/tags \ --fs-type=fsfs \ -s grass-svn grass-cvs/grass
cvs2svn --use-cvs --no-default-eol \ --force-branch=releasebranch_6_2 \ --exclude="grass" \ --exclude="grassreleasebranch_5_0_0" \ --exclude="markus" \ --exclude="releasebranch_14_august_2001_5_0_0" \ --exclude="releasebranch_26_april_2002_5_0_0" \ --exclude="releasebranch_5_4" \ --exclude="unlabeled.*" \ --exclude="devices_cleanup_20000420" \ --exclude="post_compare_glynn_head_2002_11_27" \ --exclude="post_compare_glynn_release_2002_11_27" \ --exclude="post_merge_head_2002_01_22" \ --exclude="post_sync_2002_01_22" \ --exclude="pre-curses-fix" \ --exclude="pre_merge_head_2002_01_22" \ --exclude="pre_merge_release_2002_01_22" \ --exclude="pre_sync_2001_10_31" \ --exclude="pre_sync_2002_01_17" \ --exclude="release_03_11_2003_grass5_0_3" \ --exclude="release_05_11_2004_grass5_4_0" \ --exclude="release_10_04_2003_grass5_0_2" \ --exclude="release_13_may_2002_grass5_0_0_pre4" \ --exclude="release_13_september_2001_grass5_0_0_pre2" \ --exclude="release_15_05_2004_grass5_3_0" \ --exclude="release_16_january_2002_grass5_0_0_pre3" \ --exclude="release_17_06_2004_grass5_7_0" \ --exclude="release_25_06_2002_grass5_0_0_pre5" \ --exclude="release_28_01_2003_grass5_0_1" \ --exclude="release_30_08_2002_grass5_0_0" \ --exclude="releasebranch_11_april_2001_5_0_0" \ --exclude="releasebranch_11_april_2001_5_0_0_DEAD" \ --exclude="releasebranch_500" \ --exclude="releasebranch_5_0_0" \ --exclude="release_grass500pre1_20_may_2001" \ --exclude="release_grass5beta10_7_december_2000" \ --exclude="release_grass5beta11_4_february_2001" \ --exclude="release_grass5beta11pre1_21_january_2001" \ --exclude="release_grass5beta11pre2_28_january_2001" \ --exclude="release_grass5beta6_16_feb_2000" \ --exclude="release_grass5beta7_20_april_2000" \ --exclude="release_grass5beta8_26_july_2000" \ --exclude="release_grass5beta9_6_december_2000" \ --exclude="start" \ --exclude="testbranch_5_0_0stable" \ --exclude="unlabeled-1.1.1.1.4" \ --exclude="unlabeled-1.1.1.1.6" \ --exclude="color_changes_20010502" \ --encoding="ASCII" \ --encoding="UTF-8" \ --encoding="ISO-8859-1" \ --branches=grass6/branches \ --tags=grass6/tags \ --trunk=grass6/trunk \ --existing-svnrepos \ -s grass-svn grass-cvs/grass6
cvs2svn --use-cvs --no-default-eol \ --trunk-only \ --encoding="ASCII" \ --encoding="UTF-8" \ --encoding="ISO-8859-1" \ --branches=newsletter/branches \ --tags=newsletter/tags \ --trunk=newsletter/trunk \ --existing-svnrepos \ -s grass-svn grass-cvs/newsletter
cvs2svn --use-cvs --no-default-eol \ --trunk-only \ --encoding="ASCII" \ --encoding="UTF-8" \ --encoding="ISO-8859-1" \ --trunk=web/trunk \ --existing-svnrepos \ -s grasssvn grass-cvs/web
cvs2svn --use-cvs --no-default-eol \
--force-branch=releasebranch_6_2 \ --trunk-only \ --encoding="ASCII" \ --encoding="UTF-8" \ --encoding="ISO-8859-1" \ --trunk=grass7/trunk --existing-svnrepos \ -s grass-svn grass-cvs/grass6
External links
- My Experiences With Subversion by Simon Tatham
- cvs2svn tool page
- Migration plan example
- Online book: Version Control with Subversion
SVN hosting
There are two main options to host the new SVN repository.