Migration from CVS to SVN: Difference between revisions

From GRASS-Wiki
Jump to navigation Jump to search
(→‎grass6: errors (cannot exclude branches))
m (Category:Historic)
 
(174 intermediate revisions by 4 users not shown)
Line 1: Line 1:
'''''NOTE 2008: The migration has be done - this page is archived for historical reasons'''''
This page contains notes related to GRASS code migration (planned) from CVS to SVN.
This page contains notes related to GRASS code migration (planned) from CVS to SVN.


== Basic ==
== Meta ==
 
* The SVN command line interface is just like CVS, many tasks are identical- just change the program name from cvs to svn.


== Gotchas ==
* [[SVN_hosting|Where to host the SVN repository?]]
: '''''October 2007: It has been decided to open the SVN at OSGeo'''''


* 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.
== Basic ==
 
* 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
 
== Testing SVN repository ==
 
=== Copy of GRASS CVS repository ===
 
rsync -r --times --links --bwlimit=200 rsync://rsync.intevation.de/grass grass-cvs
 
→ cca 600 MB!
 
=== Creating SVN repository ===
 
==== 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).


Solution:
* The SVN command line interface is just like CVS, many tasks are identical - just change the program name from cvs to svn.


* [http://cvs2svn.tigris.org/faq.html#atticprob cvs2svn FAQ]
== GRASS CVS repository structure ==


Remove Attic files (?)
/grass-cvs
|
+---/grass
|
+---/grass51
|
+---/grass6
|
+---/grass_doc
|
+---/libgrass
|
+---/newsletter
|
+---/programgrass50
|
+---/web


rm -f grass-cvs/grass6/display/d.erase/Attic/main.c,v
== GRASS OSGeo SVN repository structure ==
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


Restart
See [[Talk:Migration_from_CVS_to_SVN|Discussion page]] for details.


  cvs2svn --use-cvs --no-default-eol -s grass6svn grass-cvs/grass6
  /grass-svn
  ...
|
  ----- pass 2 (CollateSymbolsPass) -----
+---/grass
  ERROR: It is not clear how the following symbols should be converted.
|    |
  Use --force-tag, --force-branch and/or --exclude to resolve the ambiguity.
|    +---/trunk (grass6 CVS HEAD)
    'releasebranch_6_2' is a tag in 2 files, a branch in 5259 files and has commits in 1513 files
  |    |
|    +---/branches
  |    |    |
  |    |    +---/releasebranch_5_x (note: 5_5 based on grass5 CVS HEAD)
|    |    |
|    |    +---/releasebranch_6_x
|    |
|    +---/tags
  |
  |---/grass-addons
|
+---/grass-web
|    |
|    +---/trunk


Restart
Notes:
* <tt>grass51</tt>, <tt>grass_doc</tt>, <tt>libgrass</tt> and <tt>programgrass50</tt> are dead, will be not migrated
* <tt>grass</tt> migrated as <tt>grass/branches/releasebranch_5_5</tt>
* <tt>web</tt> migrated as <tt>grass-web</tt>
* <tt>newsletter</tt> will be merged with OSGeo newsletter repository
* wxPython GUI moved from grass-addons to grass code base (<tt>grass/gui/wxpython</tt>)
* <tt>gui/wxpython/screenshots</tt> removed, can be part of grass-addons (e.g. <tt>grass-addons/screenshots/wxpython</tt>)


cvs2svn --use-cvs --no-default-eol --force-branch=releasebranch_6_2 -s grass6svn grass-cvs/grass6
[http://josef.fsv.cvut.cz/~landa/grass-cvs2svn/ Scripts]:


Exclude all [http://grass.itc.it/devel/cvstags.php undocumented] braches
:* [http://josef.fsv.cvut.cz/~landa/grass-cvs2svn/grass-cvs2svn-base.sh grass-cvs2svn-base.sh]
:* [http://josef.fsv.cvut.cz/~landa/grass-cvs2svn/grass-cvs2svn-s2.sh grass-cvs2svn-s2.sh]
:* [http://josef.fsv.cvut.cz/~landa/grass-cvs2svn/grass-cvs2svn-wxpython.sh grass-cvs2svn-wxpython.sh]


cvs2svn --use-cvs --no-default-eol --force-branch=releasebranch_6_2 \
For text files are used <tt>keywords=Author Date Id Revision</tt>, in detail:
--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:
...


&rarr; '''[http://josef.fsv.cvut.cz/cgi-bin/viewcvs.cgi/?root=grass6svn grass6svn]'''
:* [http://josef.fsv.cvut.cz/~landa/grass-cvs2svn/propsfile-g5-2 props file for grass5]
:* [http://josef.fsv.cvut.cz/~landa/grass-cvs2svn/propsfile-g6-2 props file for grass6]


==== grass6 HEAD &rarr; grass7 ====
<!-- &rarr; '''[http://josef.fsv.cvut.cz/cgi-bin/viewcvs.cgi/?root=grass-svn2 grass-svn2]''' -->


cvs2svn --use-cvs --no-default-eol --force-branch=releasebranch_6_2 --trunk-only -s grass7svn grass-cvs/grass6
=== GRASS 7 development notes ===


&rarr; '''[http://josef.fsv.cvut.cz/cgi-bin/viewcvs.cgi/?root=grass7svn grass7svn]'''
[[Image:Grass7-development-svn.png|center]]


== External links ==
== External links ==
Line 92: Line 85:
* [http://cvs2svn.tigris.org/cvs2svn.html cvs2svn tool page]  
* [http://cvs2svn.tigris.org/cvs2svn.html cvs2svn tool page]  
* [http://www.neogia.org/Cvs_To_Subversion_Migration_Plan Migration plan example]
* [http://www.neogia.org/Cvs_To_Subversion_Migration_Plan Migration plan example]
* [http://www.xs4all.nl/~carlo17/svn/cvs2svn.html Converting CVS to subversion]
* [http://docs.codehaus.org/display/ninja/List+CVS+Tags List CVS Tags]


* Online book: [http://svnbook.red-bean.com/nightly/en/index.html Version Control with Subversion]
* Online book: [http://svnbook.red-bean.com/nightly/en/index.html Version Control with Subversion]
Line 101: Line 96:


[[Category:Development]]
[[Category:Development]]
[[Category:Historic]]

Latest revision as of 11:39, 26 January 2013

NOTE 2008: The migration has be done - this page is archived for historical reasons

This page contains notes related to GRASS code migration (planned) from CVS to SVN.

Meta

October 2007: It has been decided to open the SVN at OSGeo

Basic

  • The SVN command line interface is just like CVS, many tasks are identical - just change the program name from cvs to svn.

GRASS CVS repository structure

/grass-cvs
|
+---/grass
|
+---/grass51
|
+---/grass6
|
+---/grass_doc
|
+---/libgrass
|
+---/newsletter
|
+---/programgrass50
|
+---/web

GRASS OSGeo SVN repository structure

See Discussion page for details.

/grass-svn
|
+---/grass
|    |
|    +---/trunk (grass6 CVS HEAD)
|    |
|    +---/branches
|    |    |
|    |    +---/releasebranch_5_x (note: 5_5 based on grass5 CVS HEAD)
|    |    |
|    |    +---/releasebranch_6_x
|    |
|    +---/tags
|
|---/grass-addons
|
+---/grass-web
|    |
|    +---/trunk

Notes:

  • grass51, grass_doc, libgrass and programgrass50 are dead, will be not migrated
  • grass migrated as grass/branches/releasebranch_5_5
  • web migrated as grass-web
  • newsletter will be merged with OSGeo newsletter repository
  • wxPython GUI moved from grass-addons to grass code base (grass/gui/wxpython)
  • gui/wxpython/screenshots removed, can be part of grass-addons (e.g. grass-addons/screenshots/wxpython)

Scripts:

For text files are used keywords=Author Date Id Revision, in detail:


GRASS 7 development notes

External links

SVN hosting

There are two main options to host the new SVN repository.