<p>I am converting from existing CVS repository to SVN repository. CVS repository has few brances and I'd like to rename branches while converting.</p>

<p>Wanted conversion is like this:</p>

<pre><code>CVS branch         SVN branch
HEAD       -&gt;      branches/branchX
branchA    -&gt;      trunk
branchB    -&gt;      branches/branchB
branchC    -&gt;      branches/branchC
</code></pre>

<p>That is, CVS HEAD becomes a normal branch and CVS branchA becomes SVN trunk.</p>

<p>Both CVS and SVN repositories will be on same linux machine.</p>

<p>How could this be done? </p>

<p>Also conversion where CVS branchA becomes SVN trunk and all other CVS branches are ignored might be enough.</p>

[{'answer_id': 14382, 'author': 'T Percival', 'author_id': 954, 'author_profile': 'https://Stackoverflow.com/users/954', 'pm_score': 1, 'selected': False, 'text': '<p>Subversion branches are directories, so you could just move the branches after the import has finished and no history will be lost.</p>\n'}, {'answer_id': 14383, 'author': 'Greg Hewgill', 'author_id': 893, 'author_profile': 'https://Stackoverflow.com/users/893', 'pm_score': 3, 'selected': False, 'text': "<p>It's been a while since I've done a CVS -> SVN conversion, and probably even longer since I did one with a nontrivial branch structure. Since SVN can move around directory trees fairly easily, you could do the whole conversion first, then sort out the trunk/branches structure entirely within SVN later.</p>\n\n<p>If you do get to that point and are moving around whole directory trees within SVN, it's probably best if you commit after every tree rename/move step. Just something to keep in mind.</p>\n"}, {'answer_id': 14405, 'author': 'Juha Syrjälä', 'author_id': 1431, 'author_profile': 'https://Stackoverflow.com/users/1431', 'pm_score': 0, 'selected': False, 'text': '<p>I am especially interested in preserving commit history. If I rename and move branches around in SVN after the conversion, will the history be preserved?</p>\n'}, {'answer_id': 14411, 'author': 'Anders Sandvig', 'author_id': 1709, 'author_profile': 'https://Stackoverflow.com/users/1709', 'pm_score': 4, 'selected': True, 'text': '<blockquote>I am especially interested in preserving commit history. If I rename and move branches around in SVN after the conversion, will the history be preserved?</blockquote>\n\n<p>Yes. Subversion also keeps track of changes to the directory structure, and all version history is preserved even if a file is moved in the tree. </p>\n\n<p>I recommend converting the repository with <a href="http://cvs2svn.tigris.org/" rel="noreferrer">cvs2svn</a>, including branches and tags. Once the repository is in Subversion you can move the branches and tags around as you wish. This also keeps the history of the actual tags and branches being renamed, which may be interesting in a historical context later.</p>\n'}, {'answer_id': 129432, 'author': 'Matthew Jaskula', 'author_id': 4356, 'author_profile': 'https://Stackoverflow.com/users/4356', 'pm_score': 1, 'selected': False, 'text': "<p>Some additional information to support the accepted answer:</p>\n\n<p>cvs2svn does not allow conversion of from trunk to a branch or the branch to trunk</p>\n\n<p>so moving things once you're converted to svn is the best way to go.</p>\n"}, {'answer_id': 211627, 'author': 'mhagger', 'author_id': 24478, 'author_profile': 'https://Stackoverflow.com/users/24478', 'pm_score': 1, 'selected': False, 'text': "<p>It is possible to move the trunk and branch directories after the conversion, but this would require an explicit post-conversion SVN commit that will remain in your SVN history, making history exploration a bit more complicated.</p>\n\n<p>But you can indeed tell cvs2svn to store the trunk and branches to the SVN paths that you want by using the <code>--symbol-hints=symbol-hints.txt</code> command-line option or (if you are using an options file for your conversion) the <code>SymbolHintsFileRule('symbol-hints.txt')</code> symbol strategy rule, where <code>symbol-hints.txt</code> is a file containing lines like the following:</p>\n\n<pre><code>. .trunk. trunk branches/branchX .\n. branchX branch trunk .\n</code></pre>\n\n<p>Please note that some commit messages that are autogenerated by cvs2svn (for example, for the creation of the branch) will mention the original branch name.</p>\n"}, {'answer_id': 338341, 'author': 'Ed Thomas', 'author_id': 8256, 'author_profile': 'https://Stackoverflow.com/users/8256', 'pm_score': 1, 'selected': False, 'text': '<p>Although moving around branches after the conversion is done is possible, it may be better to setup the cvs2svn configuration file to specify exactly the name you want for each of your existing branches. One of the benefits of this is that FishEye will understand the output a lot better.</p>\n'}]
['https://Stackoverflow.com/questions/14373', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/1431/']