How to migrate/convert from SVN to Mercurial (hg) on windows

后端 未结 9 1500
南旧
南旧 2020-12-04 05:30

I\'m looking for a tool to migrate a couple of SVN repositories to Mercurial, with history, labels and so on.

I\'m using TortoiseHg (Windows x32), so ConvertExtensio

9条回答
  •  刺人心
    刺人心 (楼主)
    2020-12-04 05:49

    Using the convert extension of Mercurial:

    1. Enable convert extention; add convert= to the [extensions] section of .hgrc like this:

      [extensions]
      convert=

    2. Linux needs additional python bindings: sudo apt-get install python-subversion
    3. Execute hg convert command
      • See hg convert -h for help
      • Example: hg convert http://[svnserver]/[Project] --source-type svn [DestinationDir] (see note 2)
    4. Push to newly created Mercurial repository: hg push https://[mercurialserver]/[Project]

    note: you can even repeat the hg convert command to include new changes made in the svn repository after the previous convert.

    note 2: When hg convert doesn't work using http:// or svn:// you could first checkout the Subversion repository (or update an existing one) and convert using the local checkout; example: hg convert [DirectoryOfLocalCheckout] --source-type svn [DestinationDir]

提交回复
热议问题