如何将变更集从hg存储库导出到svn存储库 [英] How do I export changesets from hg repository to svn repository
问题描述
最简单的方法是获取从svn的一个版本与hg的一个版本同步。
从那里开始,我更新到下一个版本(来自Hg),然后将其提交到(svn) 。对许多变更集重复这些步骤是相当不方便的。有没有更方便的方法来做到这一点?
如果可能的话,这个解决方案可以在Windows操作系统中使用。
问候,
Afriza
线性系列变更集(无合并),您可以为循环使用shell 循环
<$ c $在$(seq $(hg id -n -r。)$(hg id -n -r tip));做
hg update $ therev
svn commit -m$(hg log --template'{desc}'-r。)
done
从检出版本循环到提示并提交每个都保留提交消息。您可能需要做一些特殊的事情来添加/删除文件。
I know there is hgsubversion extension for mercurial. But before I knew how it works, I maintain two separate repositories, one is SVN repo and one is Hg repo. I made most of my recent changes in the Hg repository and I need to "push" them to the svn repository.
The most straight forward way to do this is to get one revision from svn which is in sync with one revision from hg.
From there, I update to the next revision (from Hg), then commit it (to svn). Repeating these steps for many changesets is rather inconvenient. Are there more convenient ways to do this?
And if possible, solution that works in Windows OS.
Regards,
Afriza
If you're talking about a linear series of changesets (no merges) you could employ a shell for
loop
for therev in $(seq $(hg id -n -r .) $(hg id -n -r tip)) ; do
hg update $therev
svn commit -m "$(hg log --template '{desc}' -r .)"
done
That loops from the checkedout revision to the tip and commits each in turn preserving the commit message. You probably need to do something fancy arround added/removes files.
这篇关于如何将变更集从hg存储库导出到svn存储库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!