我可以在 Bazaar 中编辑旧版本的消息吗? [英] Can I edit the message of an older revision in Bazaar?

查看:16
本文介绍了我可以在 Bazaar 中编辑旧版本的消息吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何编辑旧版本的消息以更准确地描述其更改?

How can I edit an older revision's message to more correctly describe its changes?

推荐答案

如果不更改已修改修订及其所有后代的修订 ID,则无法编辑旧修订的提交消息.

You cannot edit the commit message of an old revision without changing the revision id of the modified revision and all its descendants.

嗯...技术上你可以,如果你足够努力,但结果的技术术语是损坏的存储库".bzr 中的存储库是分布式修订数据库的副本,如果所有副本不同意修订的内容,则存在完整性违规.这意味着,所有赌注都已关闭,系统将积极尝试检测此类情况并拒绝工作.

Well... technically you can, if you try hard enough, but the technical term for the result is "corrupt repository". A repository in bzr is a replica of a distributed database of revisions, and if all replicas don't agree on the content of a revision, you have an integrity violation. Meaning, all bets are off, and the system will actively try to detect such situations and refuse to work.

要修改分支中最后一个版本的提交消息,可以使用bzr uncommit",然后使用带有新提交消息的bzr commit".

To modify the commit message of the last revision in a branch, you can use "bzr uncommit", followed by "bzr commit" with the new commit message.

要修改旧版本的提交消息,您需要获取一个要修改其最后一个版本的分支,使用uncommit"然后commit",并使用bzr rebase"或bzr replay"重新附加后续版本"(来自重写"插件).

To modify the commit message of an older revision, you get a branch whose last revision you want to modify, use "uncommit" then "commit", and re-attach the subsequent revisions using "bzr rebase" or "bzr replay" (from the "rewrite" plugin).

在每种情况下,这都会产生一个被认为与您最初拥有的分支不同"的分支.如果最初的分支已发布,您的原始修订可能会再次出现,从而导致痛苦的合并、历史污染,并且通常会困扰您.

In every case, that will produce a branch which is considered "divergent" from the one you had initially. If the initial branch was published, your original revisions can come back to cause painful merges, history pollution, and generally haunt you.

这篇关于我可以在 Bazaar 中编辑旧版本的消息吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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