From b0ae0c98b0d5bf4b42425799814a9712d66c0073 Mon Sep 17 00:00:00 2001 From: mhagger Date: Sat, 15 Feb 2014 16:29:30 +0000 Subject: [PATCH] FAQ: Document how to convert projects at different times. In r2685, I documented how to do multiproject conversions the "new" way, using an options file with multiple calls to run_options.add_project(). But the "old way" (using intermediate dumpfiles) still has value, because the user might want to migrate different projects at different times. So restore part of the old text and add some new tips to reflect other improvements that have been made in cvs2svn since then. git-svn-id: http://cvs2svn.tigris.org/svn/cvs2svn/trunk@5449 be7e6eca-30d4-0310-a8e5-ac0d63af7087 --- www/faq.html | 216 ++++++++++++++++++++++++++++++++++++++++++++++------------- 1 file changed, 169 insertions(+), 47 deletions(-) diff --git a/www/faq.html b/www/faq.html index 4af53d0b..ff0f74a7 100644 --- a/www/faq.html +++ b/www/faq.html @@ -43,9 +43,6 @@
  • How can I convert a CVS repository to which I only have remote access?
  • -
  • How can I convert my CVS repository one - module at a time?
  • -
  • How can I convert part of a CVS repository?
  • @@ -62,6 +59,9 @@ that trunk/tags/branches are inside of foo? +
  • What if I don't want to convert + all of my projects at once?
  • +
  • How do I fix up end-of-line translation problems?
  • @@ -228,38 +228,6 @@ one of them, please tell us about your experience on the users mailing list.

    -

    How can I convert my CVS -repository one module at a time?

    - -

    If you need to convert certain CVS modules (in one large -repository) to Subversion now and other modules later, -you may want to convert your repository one module at a time. This -situation is typically encountered in large organizations where each -project has a separate lifecycle and schedule, and a one-step -conversion process is not practical. -

    - -

    First you have to decide whether you want to put your converted -projects into a single Subversion repositories or multiple ones. This -decision mostly depends on the degree of coupling between the projects -and is beyond the scope of this FAQ. See the -Subversion book for a discussion of repository organization. -

    - -

    If you decide to convert your projects into separate Subversion -repositories, then please follow the instructions in How can I convert part of a CVS -repository? once for each repository. -

    - -

    If you decide to put more than one CVS project into a single -Subversion repository, then please follow the instructions in How can I convert separate projects in my CVS -repository into a single Subversion repository?. -

    - -

    How can I convert part of a CVS repository?

    @@ -285,6 +253,11 @@ repository at /path/foo-svn that includes only the projects in my CVS repository into a single Subversion repository? +

    This question assumes that you will convert all of your projects at +the same time. If you must convert your projects at different times, +please see What if I don't want to convert all +of my projects at once?

    +

    cvs2svn supports multiproject conversions, but you have to use the options file method to start the conversion. In your options file, you simply call @@ -292,21 +265,21 @@ start the conversion. In your options file, you simply call repository. For example, if your CVS repository has the layout:

    -  /project_a
    -  /project_b
    +  /project-a
    +  /project-b
     

    and you want your Subversion repository to be laid out like this:

    -   project_a/
    +   project-a/
           trunk/
              ...
           branches/
              ...
           tags/
              ...
    -   project_b/
    +   project-b/
           trunk/
              ...
           branches/
    @@ -319,10 +292,10 @@ repository.  For example, if your CVS repository has the layout:

     run_options.add_project(
    -    'my/cvsrepo/project_a',
    -    trunk_path='project_a/trunk',
    -    branches_path='project_a/branches',
    -    tags_path='project_a/tags',
    +    'my/cvsrepo/project-a',
    +    trunk_path='project-a/trunk',
    +    branches_path='project-a/branches',
    +    tags_path='project-a/tags',
         symbol_transforms=[
             #...whatever...
             ],
    @@ -331,10 +304,10 @@ run_options.add_project(
             ],
         )
     run_options.add_project(
    -    'my/cvsrepo/project_b',
    -    trunk_path='project_b/trunk',
    -    branches_path='project_b/branches',
    -    tags_path='project_b/tags',
    +    'my/cvsrepo/project-b',
    +    trunk_path='project-b/trunk',
    +    branches_path='project-b/branches',
    +    tags_path='project-b/tags',
         symbol_transforms=[
             #...whatever...
             ],
    @@ -464,6 +437,155 @@ run_options.add_project(
         information.

    +

    What if I don't want to convert + all of my projects at once?

    + +

    Suppose you need to convert some CVS projects to + Subversion now and other projects later. This + situation is typically encountered in large organizations where each + project has a separate lifecycle and schedule, and a one-step + conversion process is not practical.

    + +

    First you have to decide whether you want to put your converted + projects into a single Subversion repository or multiple + repositories. This is mostly an administrative decision and is + beyond the scope of this FAQ. + See the + Subversion book for a discussion of repository organization.

    + +

    If you decide to convert your projects into separate Subversion + repositories, then please follow the instructions + in How can I convert part of a CVS + repository?, once for each repository.

    + +

    If, on the other hand, you want to convert the CVS projects at + different times but put them into a single Subversion repository, + then you need to follow the instructions in this section.

    + +

    NOTE: importing projects one at a time into a single + Subversion repository will usually break date-based range commands + (e.g. svn diff -r {2002-02-17:2002-03-18}) for the + overlapping dates. This is because Subversion uses a bisect-based + search to locate commits from a given date, and this algorithm fails + for non-monotonic dates. While this is not the end of the world, it + can be an inconvenience.

    + +

    Remember that a multiproject Subversion repository should usually + be laid out like this:

    + +
    +   project-a/
    +      trunk/
    +         ...
    +      branches/
    +         ...
    +      tags/
    +         ...
    +   project-b/
    +      trunk/
    +         ...
    +      branches/
    +         ...
    +      tags/
    +         ...
    +
    + +

    Note that each project has its own top-level directory that + contains trunk, branches, and tags + subdirectories. The procedure is to convert each project separately + to a dumpfile with the following directory structure:

    + +
    +   project-a/
    +      trunk/
    +         ...
    +      branches/
    +         ...
    +      tags/
    +         ...
    +
    + +

    and then to load the dumpfile into the Subversion repository + using svnadmin load.

    + +

    Example:

    + +
      +
    1. If the svn repository doesn't already exist, create it: +
      +      svnadmin create /path/to/svnrepos
      +    
    2. + +
    3. Remember to make a backup before starting. Never run + cvs2svn on a live CVS repository--always work on a copy of your + repository.
    4. + +
    5. Run cvs2svn against one of the projects that you want converted: +
      +      # Create a dumpfile containing the new CVS repository contents
      +      $ cvs2svn --dumpfile=/tmp/project-a.dump \
      +                --trunk=project-a/trunk \
      +                --branches=project-a/branches \
      +                --tags=project-a/tags \
      +                /path/to/cvsrepo/project-a
      +    
    6. + + +
    7. Use svnadmin load to import the dump into the + Subversion repository: +
      +      $ cd ~/svndump
      +      $ svnadmin load /path/to/svnrepos </tmp/project-a.dump
      +    
    8. + +
    9. Repeat steps 3 and 4 for each module you want to convert.
    10. + +
    + +

    Variations:

    + +
      + +
    • It is possible to convert more than one CVS repository per + batch; to do so, see How can I convert + separate projects in my CVS repository into a single Subversion + repository?, remembering to have cvs2svn write its output to a + dumpfile each time.
    • + +
    • For more complicated directory arrangements, it might be + necessary to use svnadmin load's --parent-dir + option to place directories in their final location. For example, + suppose you want the following layout in Subversion: + +
      +   server/
      +       project-a/
      +       project-b/
      +   client/
      +       project-c/
      +       project-d/
      +
      + + but you want to convert project-a and project-b + at different times. The above recipe will not work, because + svnadmin load would give an error when project-b + tries to create directory server/, because the directory + already exists from when project-a was loaded. The + solution is to convert project-b as a top-level project: +
      +      $ cvs2svn --dumpfile=/tmp/project-b.dump \
      +                /path/to/cvsrepo/project-b
      +    
      + but then load it using the --parent-dir option: +
      +      $ svnadmin load --parent-dir=project-b /path/to/svnrepos </tmp/project-b.dump
      +    
      +
    • + +
    + + +

    How do I fix up end-of-line translation problems?

    -- 2.11.4.GIT