简体   繁体   English

窑库资料库

[英]Kiln Mercurial Repositories for Versions

we use Kiln with mercurial. 我们将窑炉与水银一起使用。

Simplified description we have 2 kind of Repositories. 简化的描述我们有2种存储库。

Some Kind of 一些

" CurrentDevelopment " and repositories for each released version for example 13.1 for the released version 13.1. “CurrentDevelopment”和存储库的每个发行版本,例如13.1释放13.1版本。 (There are also user repos and more, like descriped in hginit.com but this can be ignored for the moment) (也有用户存储库等,如hginit.com中所述,但这暂时可以忽略不计)

Now sometimes we need to make a fix to a released version. 现在有时我们需要修复已发布的版本。 So we fix it in the Repository for the released version. 因此,我们在发行版本的存储库中对其进行了修复。 For 13.1. 对于13.1。

Then we cann pull from 13.1 to the currentDevelopment repository 然后我们就不能从13.1拉到currentDevelopment储存库

This seems to work fine. 这似乎很好。

But now we could make something in " CurrentDevelopment " and a month later we recognize that this change will also be needed in 13.1 But I can't pull from CurrentDevelopment to 13.1 because there are a lot of other changes i don't want to have in 13.1 但是现在我们可以在“ CurrentDevelopment ”中进行一些操作,一个月后,我们意识到在13.1中也需要进行此更改。但是我不能从CurrentDevelopment转到13.1,因为我不想进行很多其他更改在13.1中

I know this is some kind of "cherry picking" which i isn'T easy realized. 我知道这是一种“樱桃采摘”,我不容易意识到。 But if it wouldn't be many source code i code recode them in 13.1 . 但是如果源代码不多,我会在13.1中重新编码。

But after that when i make changes to 13.1 which i pull to current development i would also pull the changes that are already included in CurrentDevelopment :-/ so in worst case i may get merge failures and duplicate code? 但是在那之后,当我对当前的开发进行13.1更改时,我也将撤消CurrentDevelopment中已包含的更改:-/因此,在最坏的情况下,我可能会出现合并失败和重复代码? I'm not sure if mercurial will safely recognize that this code is also contained. 我不确定Mercurial是否可以安全地识别出此代码也包含在内。

What is the recommended approach to realise these version specific repositories and handle changes between them ? 建议使用什么方法来实现这些特定于版本的存储库并处理它们之间的更改? In especial if a change of the current development repository is afterwards needed in a child verison branch? 特别是,之后是否需要在子版本分支中更改当前的开发资源库?

The graft mercurial command is your friend here. 移植善变的命令是在这里你的朋友。 It allows you to back-port a change to an old branch. 它允许您将更改反向移植到旧分支。

If your Kiln version is older & doesn't have a version of Mercurial that includes the graft command, you could use the (similar but less reliable) transplant extension. 如果您的窑版本较旧并且没有包含graft命令的Mercurial版本,则可以使用(类似但不太可靠的) 移植扩展。 (graft uses Mercurial's merge logic, transplant just uses the patch logic) (移植使用Mercurial的合并逻辑,移植仅使用补丁逻辑)

edit... I don't think that graft command is exposed in the UI of the version of TortoiseHg that is currently bundled with Kiln. 编辑...我认为当前与Kiln捆绑在一起的TortoiseHg版本的UI中没有公开嫁接命令。 See how to use graft in TortoiseHg The command line should still work though. 查看如何在TortoiseHg中使用嫁接尽管命令行仍然应该起作用。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM