Topic
16 replies Latest Post - ‏2014-08-21T13:01:49Z by Mais316
SystemAdmin
SystemAdmin
47293 Posts
ACCEPTED ANSWER

Pinned topic [cciug] SVN to Clearcase migration

‏2008-07-02T09:07:34Z |
Hi All,

Please let me know if somebody has done the migration from SVN to
clearcase.

Please help.

Regards

Irfan.

_______________________________________________
cciug mailing list
cciug@lists.ca.ibm.com
Unsubscribe:cciug-leave@lists.ca.ibm.com
Updated on 2008-07-10T20:45:21Z at 2008-07-10T20:45:21Z by SystemAdmin
  • Tgefen
    Tgefen
    712 Posts
    ACCEPTED ANSWER

    Re: [cciug] SVN to Clearcase migration

    ‏2008-07-02T10:25:10Z  in response to SystemAdmin
    I did it a few years ago.
    Do you have a particular question?
    • SystemAdmin
      SystemAdmin
      47293 Posts
      ACCEPTED ANSWER

      RE: [cciug] SVN to Clearcase migration

      ‏2008-07-02T13:30:20Z  in response to Tgefen
      Hi,
      Thanks for your reply. I need step by step procedure to move all the source code from SVN to clearcase. I have never done this ever before.

      Please help

      Regards
      Irfan.
      -----Original Message-----
      From: cciug-bounces@lists.ca.ibm.com mailto:cciug-bounces@lists.ca.ibm.com On Behalf Of Rational ClearCase
      Sent: Wednesday, July 02, 2008 3:55 PM
      To: cciug@lists.ca.ibm.com
      Subject: Re: cciug SVN to Clearcase migration

      I did it a few years ago.

      Do you have a particular question?

      _______________________________________________
      cciug mailing list
      cciug@lists.ca.ibm.com
      Unsubscribe:cciug-leave@lists.ca.ibm.com
  • SystemAdmin
    SystemAdmin
    47293 Posts
    ACCEPTED ANSWER

    Re: [cciug] SVN to Clearcase migration

    ‏2008-07-02T11:45:03Z  in response to SystemAdmin
    There is a open source program called svn2cc that works pretty well. You can download it at http://svn2cc.sarovar.org. If you choose to use this tool, a couple things I would recommend are:
    1. Clean out your svn repository. Primarily make sure no file names contain a '$' as it will cause the load to fail due to a regex parsing error.
    2. When dumping your svn repository (the svn2cc uses a svn dump file), keep the dump to small blocks of revisions incrementally. I kept the blocks 100 revs or less. This will make recovering from any errors much easier. The first dump I did not add the incremental flag too.
    Example dumps:
    svnadmin dump -r 0:100 > dump-1-100.dmp
    svnadmin dump -r 101:200 --incremental > dump-101-200.dmp
    3. Create a dedicated CC stream for the import process.
    4. Create a dedicated CC label for the import process.

    There are two flavors the tool comes in. One creates a series of batch files that need to be executed after java program is run. The second makes CC call directly from the java program. I used the latter of the two. I did make two changes to the code. The first was to cleanly handle the regex problem in point 1 above (requires java 5 or above). The other was to output the results of the CC commands because the error messages normally output by the program are not very helpful...

    Good luck with the transition!
    • SystemAdmin
      SystemAdmin
      47293 Posts
      ACCEPTED ANSWER

      RE: [cciug] SVN to Clearcase migration

      ‏2008-07-02T13:28:50Z  in response to SystemAdmin
      Thanks for your reply. I have gone through the webpage provided by you. It seems that svn2cc utility is to convert SVN dumps to cleacase commands but my requirement is that I need to convert all the source code reside in the SVN repository to clearcase repository.

      I never found the download option also.
      Please help.

      Regards
      Irfan.
      -----Original Message-----
      From: cciug-bounces@lists.ca.ibm.com mailto:cciug-bounces@lists.ca.ibm.com On Behalf Of Rational ClearCase
      Sent: Wednesday, July 02, 2008 5:15 PM
      To: cciug@lists.ca.ibm.com
      Subject: Re: cciug SVN to Clearcase migration

      There is a open source program called svn2cc that works pretty well. You can download it at http://svn2cc.sarovar.org dump-101-200.dmp

      3. Create a dedicated CC stream for the import process.

      4. Create a dedicated CC label for the import process.

      There are two flavors the tool comes in. One creates a series of batch files that need to be executed after java program is run. The second makes CC call directly from the java program. I used the latter of the two. I did make two changes to the code. The first was to cleanly handle the regex problem in point 1 above (requires java 5 or above). The other was to output the results of the CC commands because the error messages normally output by the program are not very helpful...

      Good luck with the transition!

      _______________________________________________
      cciug mailing list
      cciug@lists.ca.ibm.com
      Unsubscribe:cciug-leave@lists.ca.ibm.com
      • SystemAdmin
        SystemAdmin
        47293 Posts
        ACCEPTED ANSWER

        Re: RE: [cciug] SVN to Clearcase migration

        ‏2008-07-02T14:35:22Z  in response to SystemAdmin
        The utility does exactly what you need. It does it in one two ways. The fist is to create a series of batch files that need to be executed after the utility runs. The batch files, when executed, will then insert the source files into CC. The second is to directly insert the records into CC from the utility. You can choose what option is best for you project.

        The SVN dump file contains all the data you need. That includes the source file and its associated meta-data (history, author, etc). Your SVN administrator will be able to generate the dump files for you.

        If you don't need to preserve all the meta-data, update your SVN view to the most current. Copy the files to your CC view. From the CC view add the files to source control. Using this method will treat each file as new file and all history will be lost.

        Try this link for more information: http://sarovar.org/projects/svn2cc/
        • SystemAdmin
          SystemAdmin
          47293 Posts
          ACCEPTED ANSWER

          RE: RE: [cciug] SVN to Clearcase migration

          ‏2008-07-03T06:34:57Z  in response to SystemAdmin
          Thank you for such a nice reply.

          I want to use that option where history, metadata can be maintained.
          I have downloaded three utilities svn2cc, cc_direct, svndump. Can you please tell me what is the significance of cc_direct and svndump utility.

          I have following setup.

          SVN server is on windows
          Clearcase server is on windows

          Can you please tell which option I should use in all these utilities to create the svndump file and export all the source code to clearcase with an example.

          Please help.

          Regards
          Irfan.

          -----Original Message-----
          From: cciug-bounces@lists.ca.ibm.com mailto:cciug-bounces@lists.ca.ibm.com On Behalf Of Rational ClearCase
          Sent: Wednesday, July 02, 2008 8:05 PM
          To: cciug@lists.ca.ibm.com
          Subject: Re: RE: cciug SVN to Clearcase migration

          The utility does exactly what you need. It does it in one two ways. The fist is to create a series of batch files that need to be executed after the utility runs. The batch files, when executed, will then insert the source files into CC. The second is to directly insert the records into CC from the utility. You can choose what option is best for you project.

          The SVN dump file contains all the data you need. That includes the source file and its associated meta-data (history, author, etc). Your SVN administrator will be able to generate the dump files for you.

          If you don't need to preserve all the meta-data, update your SVN view to the most current. Copy the files to your CC view. From the CC view add the files to source control. Using this method will treat each file as new file and all history will be lost.

          Try this link for more information: http://sarovar.org/projects/svn2cc/

          _______________________________________________
          cciug mailing list
          cciug@lists.ca.ibm.com
          Unsubscribe:cciug-leave@lists.ca.ibm.com
          • SystemAdmin
            SystemAdmin
            47293 Posts
            ACCEPTED ANSWER

            Re: RE: RE: [cciug] SVN to Clearcase migration

            ‏2008-07-03T12:05:26Z  in response to SystemAdmin
            The main svn2cc jar file uses a the main class that creates the batch files but contains the source files and binaries for the direct code.

            The svn2cc_direct jar file contains the source and binaries for direct inserts into CC (no batch files).

            The SVNDump I have not looked at, unfortunately, I do not know what that does.

            To dump svn you need to use the svnadmin dump command. svnadmin should have been installed when subversion was installed. I used svn on linux so I am not sure where the subversion windows install places that file.

            Example svn dump commands. For more information see the Subversion Documentation.

            This command will dump the entire repository, from my experience, I would not recommend it.
            svnadmin dump path/to/repository > full_repo.dmp

            This command will do a full dump the first 100 versions of the svn repository - Recommended
            svnadmin dump path/to/repository -r0:100 > full_r0-100.dmp

            This command will do an incremental dump versions 101-200 of svn repository - Recommended. Repeat this command until all versions of repository are dumped.
            svnadmin dump path/to/repository -r101:200 --incremental > incremental_r101-200.dmp
            Then to load into CC. See the svn2cc documentation for switch meanings and any additional switch you man need. You should make an label type in CC before importing. See CC mklbtype man page for details (cleartool man mklbtype).

            Repeat below command for each dump file created during the dumping process. I used the direct calls so, I only needed to use the below statement.
            java -Xmx512 -jar <path/and/Name of jar file> <path/to/dump file> -t "" -c "cleartool mklabel -replace " -v
            • SystemAdmin
              SystemAdmin
              47293 Posts
              ACCEPTED ANSWER

              RE: RE: RE: [cciug] SVN to Clearcase migration

              ‏2008-07-03T14:19:40Z  in response to SystemAdmin
              Hi,

              Thanks again for your reply but frankly speaking I did not understand anything.

              Could you please give me step by step procedure as I am very new to SVN. I have worked on CC for last 7 yrs. But SVN is really new to me. Actually the requirement is that one of my project is using SVN to maintain the source code and now company want to migrate from SVN to cc.

              Environment is as follows
              SVN server : windows
              CC server : windows

              Please Please help

              Regards
              Irfan.
              -----Original Message-----
              From: cciug-bounces@lists.ca.ibm.com mailto:cciug-bounces@lists.ca.ibm.com On Behalf Of Rational ClearCase
              Sent: Thursday, July 03, 2008 5:35 PM
              To: cciug@lists.ca.ibm.com
              Subject: Re: RE: RE: cciug SVN to Clearcase migration

              incremental_r101-200.dmp
              Then to load into CC. See the svn2cc documentation for switch meanings and any additional switch you man need. You should make an label type in CC before importing. See CC mklbtype man page for details (cleartool man mklbtype).

              Repeat below command for each dump file created during the dumping process. I used the direct calls so, I only needed to use the below statement.

              java -Xmx512 -jar -t "" -c "cleartool mklabel -replace " -v

              _______________________________________________
              cciug mailing list
              cciug@lists.ca.ibm.com
              Unsubscribe:cciug-leave@lists.ca.ibm.com
              • SystemAdmin
                SystemAdmin
                47293 Posts
                ACCEPTED ANSWER

                Re: RE: RE: RE: [cciug] SVN to Clearcase migration

                ‏2008-07-03T15:23:26Z  in response to SystemAdmin
                For more information on Subversion see Version Control with Subversion. Chapter 5 should be of particular interest.

                I am not sure how much more help I can provide. Within this thread all the steps I followed to dump SVN and import to CC have been documented. Hopefully, somebody else in the community can provide the assistance you need.
                • SystemAdmin
                  SystemAdmin
                  47293 Posts
                  ACCEPTED ANSWER

                  Re: RE: RE: RE: [cciug] SVN to Clearcase migration

                  ‏2008-07-03T15:29:03Z  in response to SystemAdmin
                  Don't bother, this particular user in principle needs detailed explanation for even the simplest actions and also doesn't tend to read any documentation. Why, I wouldn't even try to guess.

                  Regards,

                  Kristijan
                  Updated on 2008-07-03T15:29:03Z at 2008-07-03T15:29:03Z by SystemAdmin
                  • SystemAdmin
                    SystemAdmin
                    47293 Posts
                    ACCEPTED ANSWER

                    Re: RE: RE: RE: [cciug] SVN to Clearcase migration

                    ‏2008-07-08T19:49:57Z  in response to SystemAdmin
                    Looking for a question along the same line, however I do not need a step by step, just a quick answer. I just downloaded the svn2cc utility and started looking at the documentation.

                    Also I was looking at the svn dump command and flags and some of the other commands. Do you know if it is possible to dump by a date range and not just by revision. I do not see this in the documentation for dump. Of course I am still going through it, but thought you might know better from your experience.

                    Thanks in advance
                    • SystemAdmin
                      SystemAdmin
                      47293 Posts
                      ACCEPTED ANSWER

                      Re: RE: RE: RE: [cciug] SVN to Clearcase migration

                      ‏2008-07-09T11:52:36Z  in response to SystemAdmin
                      Unfortunately, I do not know enough about SVN to answer that question.

                      Good luck with the migration.

                      -Marc
                  • SystemAdmin
                    SystemAdmin
                    47293 Posts
                    ACCEPTED ANSWER

                    Re: RE: RE: RE: [cciug] SVN to Clearcase migration

                    ‏2008-07-09T13:42:35Z  in response to SystemAdmin
                    Have a question along the same lines, however I do not need a step by step, just a quick answer. I just downloaded the svn2cc utility and started looking at the documentation.

                    Also I was looking at the svn dump command and flags and some of the other commands. Do you know if it is possible to dump by a date range and not just by revision. I do not see this in the documentation for dump. Of course I am still going through it, but thought you might know better from your experience.

                    Thanks in advance
                    • SystemAdmin
                      SystemAdmin
                      47293 Posts
                      ACCEPTED ANSWER

                      Re: RE: RE: RE: [cciug] SVN to Clearcase migration

                      ‏2008-07-10T20:45:21Z  in response to SystemAdmin
                      I'm fairly familiar with svnadmin, but not an "Expert". I can confidently say that there is no such way to dump a range of revisions based upon some date criteria you pass as argument(s) to svnadmin. If you think about it, since all revisions in svn are chronological, it shouldn't be too difficult to find the desired revision number(s) and dump accordingly. Now, if you are trying to dump only certain revisions (many of them) that were only committed on certain dates (many of them), then you have an entirely different issue and you should think of another way to solve the problem, IMO.

                      But like I said, finding commit dates for each revision is easy so essentially just pick which revisions you want and tell svnadmin dump those revision numbers.

                      Also might give a look at the command svndumpfilter.
                      • Mais316
                        Mais316
                        5 Posts
                        ACCEPTED ANSWER

                        Re: RE: RE: RE: [cciug] SVN to Clearcase migration

                        ‏2014-08-21T13:01:49Z  in response to SystemAdmin

                        Hi All ,

                         

                        I m trying to find svn2cc tool but i can not , can any one share it