我正在尝试理解如何将我的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在这一点上,我想把我未完成的、未提交的补丁推到repo上。我读到过Mercurial队列实际上是它们自己的repos,因此可以像普通的hg repo一样操作,但我不清楚我正在尝试做的工作流程。我已经将我的shell中的mq命令别名为hg -R $(hg root)/.hg/patches,但是我希望就人们如何管理远程备份和共享未提交的补丁提供一些反馈。谢谢。
发布于 2012-12-12 00:04:22
在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 --mq和hg commit --mq命令以hg qinit和hg qcommit的形式提供(现在已被弃用)。
发布于 2012-12-10 19:44:57
hg push --mq在MQ上轻松交换和协作
发布于 2012-12-12 00:04:38
您可以在.hg/patches中创建一个存储库,并将其作为单独的存储库进行推送。在更高版本的mercurial中,您只需执行hg ci --mq,它将提交最新版本的补丁存储库。提交后,您可以将其克隆到bitbucket。
https://stackoverflow.com/questions/13796888
复制相似问题