Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>As far as I understand your problem now: You have a Hg repository which was once converted from SVN, where keyword expansion had been used. Now the expanded keywords remain unchanged in the Hg repo. You now want to strip those keywords (or just their expanded values) from the Hg history, preserving author, date/time, commit message and of course changed files.</p> <p>This is just an idea, I have never done this in practical, but ... Speaking just of mercurial, I think it's possible to do this by a combination of usual mercurial behaviour, just for one branch and without tags and other branches:</p> <ol> <li>Clone the intended source repository</li> <li>Prepare an empty Hg repository</li> <li>Perform <code>hg log &gt; logfile.txt</code> over the source repo on that branch you want to change</li> <li>Parse the file getting a structured list of all necessary information like changeset number, user, date and summary, store this into a data structure that allows easy iteration</li> <li>Iterate through the list (or directly use the log file) and ... <ul> <li>delete all working files from the destination repo</li> <li>export a changeset from the source repo to the working copy of the destination repo</li> <li>change anything in the working files you want to do</li> <li><code>hg addremove</code></li> <li><code>hg commit -m ... -d ... -u ...</code></li> </ul></li> <li>Repeat step 5 as often as necessary</li> </ol> <p>The drawback is that the changesets will get new hash values, so tags and bookmarks need to be updated.</p> <p>If there are other branches that have to be migrated:</p> <ol> <li>Update the destination repo to that branch's starting point</li> <li>and the source repo, too</li> <li>insert steps 3 to 6 from the above list here</li> </ol> <p>Perhaps there is some more work to be done, but I think this could work. As told before, I've never done this.</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