将汞变化提交回SVN [英] Submitting Hg changes back to SVN

查看:95
本文介绍了将汞变化提交回SVN的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经开始在SVN信息库中工作.我已经使用hg clone将其子文件夹克隆到本地的Hg存储库中.

I've began work in an SVN repository. I've cloned a subfolder of it into a local Hg repo with hg clone.

此后,我想与无权访问SVN信息库的同事共享此信息.我创建了一个私有的BitBucket存储库,我们有时会推送更改,因此不得不将其删除.

Afterwards, I wanted to share this with a colleague who does not have access to the SVN repository. I've created a private BitBucket repository, and we occasionally pushed the changes, and hence I had to pull them.

hgsubversion对变更集做了一些令人讨厌的事情,例如更改其提交者(而且我相信甚至是哈希).当我尝试向BitBucket存储库推入和拉出时,我必须进行合并.

hgsubversion does some nasty things to changesets, such as changing their committer (and I believe even the hash). When I tried pushing and pulling to the BitBucket repo, I had to do a merge.

由于我们挚爱的朋友abort: Sorry, can't find svn parent of a merge revision.,现在我无法将更改推回Subversion存储库.

Now I am unable to push changes back into the Subversion repository due to our beloved friend, abort: Sorry, can't find svn parent of a merge revision..

如何与以svn为目标的Mercurial存储库一起拉取以BitBucket为目标的Mercurial存储库,同时又与hgsubversion保持兼容(即,不导入合并修订版)?

How would one pull the BitBucket-targetting Mercurial repository with the svn-targetting Mercurial repository, while staying compatible with hgsubversion (that is, without importing the merge revisions)?

当然会喜欢一些自动化的方法,但是,如果没有这种事情/简便的方法,我将不胜感激.

Some automated way to do this would be appreciated, of course, but if there is no such thing/easy way to do this, I'd be grateful for any solution.

我使用hgsubversion,而不是hgsvn;也就是hg clone svn://repo/url所在的扩展名.不过,如有必要,我愿意进行切换.

I use hgsubversion, not hgsvn; that is, the extension in which one does hg clone svn://repo/url. I am open to switching, though, if necessary.

推荐答案

在Subversion版本库上使用Mercurial时,您仍然必须像SVN一样思考,因此基本的Merurial工作流中的许多功能都不会工作.合并suvn仓库上的mercurial方式是不可能的.如果您将您的工作与拉出的svn分支合并,您将得到关于现在收到的消息的臭名昭著:(

When you use Mercurial on a subversion repository, you have to still think like SVN does, so a lot of features part of the basic mercurial workflow just won't work. Merging the way mercurial does it is impossible on a svn depot. If you have merged your work with the pulled svn branch, you'll get the infamous about message you're getting now :(

我建议您阅读durin42对此问题的回答.

I suggest you read durin42's answer to this question.

要摆脱当前的混乱局面,建议您从SVN存储库中结帐时创建一个补丁(或一系列补丁).从Subversion存储库中获取一个新的新副本,然后应用补丁.我不确定您是否可以从当前的存储库中执行此操作.您可以探索hg diff命令.

EDIT : To get out of your current mess, I suggest you create a patch (or a series of patches) from the point you checkout from the SVN repo. Get a new fresh copy from the subversion repository and apply the patch(es). I am not sure you'll be able to do it from your current repo. You could explore the hg diff command.

hg diff -g -r tip -r XXX > patch

其中XXX是您的原始SVN结帐(我尚未测试过).

with XXX being your original SVN checkout (I haven't tested it yet.)

这篇关于将汞变化提交回SVN的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆