gpt4 book ai didi

Mercurial 队列 - 备份和共享未提交的补丁

转载 作者:行者123 更新时间:2023-12-03 06:51:52 26 4
gpt4 key购买 nike

我试图了解如何将我的 Mercurial 补丁推送到远程存储库(例如 bitbucket.org),而不必先应用它们(实际上提交它们)。我的动机是在最终完成之前首先对我的工作进行远程备份,并且能够与其他人共享这些补丁或从不同的计算机上处​​理它们。

我的正常工作流程是这样的:

$ hg qnew some-feature -m "work on some feature"

... work on some files

$ hg qref

--> bug or other feature request comes along

$ hg qpop some-feature
$ hg qnew new-feature -m "work on different feature"
... work on new stuff
$ hg qref

此时,我想将未完成、未提交的补丁推送到存储库。我已经读到 Mercurial 队列实际上是它们自己的存储库,因此可以像普通的 hg 存储库一样进行操作,但我不清楚我想要做什么的工作流程。我已将 shell 中的 mq 命令别名为 hg -R $(hg root)/.hg/patches,但我希望获得一些有关人们如何管理远程备份和共享未提交补丁的反馈。谢谢。

最佳答案

在 Bitbucket 上,您可以创建存储库和补丁队列。 Bitbucket似乎没有提供详细的official documentation还没有补丁队列,但是有一个 blog post描述了如何使用它们。

要备份/共享未提交的补丁,基本工作流程命令是:

hg init --mq # initialize .hg/patches as a versioned repository (hereafter referred to as the MQ repository)
# manually configure .hg/patches/.hg/hgrc to contain a [paths] section if desired
hg commit --mq # commit in the MQ repository
hg push --mq # push the MQ repository to default remote
hg pull --mq # pull the MQ repository from default remote
hg update --mq/hg merge --mq # same as normal for hg, but operating on the MQ repository

在旧版本的 Mercurial 中,hg init --mqhg commit --mq 命令提供为 hg qinithg qcommit(现已弃用)。

关于Mercurial 队列 - 备份和共享未提交的补丁,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13796888/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com