首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
MCP广场
社区首页 >问答首页 >Mercurial队列-备份和共享未提交的补丁

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

Stack Overflow用户
提问于 2012-12-10 15:48:50
回答 3查看 791关注 0票数 3

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

我的正常工作流程是:

代码语言:javascript
运行
复制
$ 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,但是我希望就人们如何管理远程备份和共享未提交的补丁提供一些反馈。谢谢。

EN

回答 3

Stack Overflow用户

发布于 2012-12-12 00:04:22

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

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

代码语言:javascript
运行
复制
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的形式提供(现在已被弃用)。

票数 2
EN

Stack Overflow用户

发布于 2012-12-10 19:44:57

  • hg push --mq在MQ
  • mqcollab中推送变更集补丁程序-在MQ补丁程序

上轻松交换和协作

票数 1
EN

Stack Overflow用户

发布于 2012-12-12 00:04:38

您可以在.hg/patches中创建一个存储库,并将其作为单独的存储库进行推送。在更高版本的mercurial中,您只需执行hg ci --mq,它将提交最新版本的补丁存储库。提交后,您可以将其克隆到bitbucket。

票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/13796888

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档