Note that there are some explanatory texts on larger screens.

plurals
  1. POHow to keep revision timestamps while converting a repository from Mercurial to Subversion?
    text
    copied!<p>Because of work policies, I'm forced to use Subversion. Currently I've developed some code using Mercurial, and I have to convert this repository to a new Subversion repository. The current Mercurial repository also contains legacy code parts that I copied from another SVN repository (a HW driver), and this code contains keywords (like <code>$Id: ...$</code>) that were expanded while I copied the code.</p> <p>My current approach to do the conversion is:</p> <pre><code>hg convert --dest-type svn repository.hg repository.svn </code></pre> <p>This works, unfortunately it does not preserve the timestamps of Mercurial revisions. Additionally, it expands tags in some legacy code parts where someone wrote <code>$Id: ...$</code> stuff.</p> <p>The questions:</p> <ol> <li>How can I export to Subversion, keeping the timestamps of revisions.</li> <li>How can I convert without expanding $Id:$ style keywords, or, even better, delete the offending lines while converting. Is this possible, or do I have to modify the history of the Mercurial dump before converting to make sure no keywords are present?</li> </ol> <p>Sorry if this question has been answered already, I've searched intensely with Google and on here, but I cannot find an answer for this problem. Especially the timestamp problem must be something that others have already run into.</p> <p>Cheers, H.</p> <p><strong>EDIT:</strong> I've since created a script that extracts timestamps from a Mercurial export file and updates a Subversion dumpfile, which is nothing more but a kludge, but it works. The <code>$Id:</code> problem is still unsolved, unfortunately.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload