对许多用户和补丁使用BitBucket上的Mercurial补丁队列存储库 [英] Using Mercurial patch queue repository on BitBucket for many users and patches

查看:57
本文介绍了对许多用户和补丁使用BitBucket上的Mercurial补丁队列存储库的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

很抱歉,这个问题涉及很多部分,但是我很难理解将Mercurial Patch Queue与BitBucket一起使用的预期方法,而Google并没有太大帮助.我希望一个描述某些MQ概念的答案可以一次涵盖许多问题.我已阅读 http://ches.nausicaamedia.com /articles/technogeekery/using-mercurial-queues-and-bitbucket-org ,但它似乎已经过时且不完整.我的总体计划是允许大量用户提交大量更改,而不必将其提交给分支机构.这些补丁代表玩家对游戏进行的可选修改,以增强和扩展游戏.我希望用户能够挑选任意一个补丁或一组补丁来玩和查看.当我对hg的工作原理有了深刻的了解后,我打算编写一些PHP脚本或一些东西来将分支以及选定的补丁集拉入一个工作区中,以便播放器能够运行HTML5代码以供查看.

Sorry for the many-part question, but I am having a difficult time understanding the intended methods to use a Mercurial Patch Queue with BitBucket, and Google isn't helping much. My hope is that one answer describing some MQ concepts will cover many of the questions at once. I have read http://ches.nausicaamedia.com/articles/technogeekery/using-mercurial-queues-and-bitbucket-org, but it seems to be out of date and incomplete. My overall plan is to allow a multitude of submitted changes from a multitude of users without necessarily committing them to a branch. These patches represent optional modifications players are making to a game to enhance and extend the game. And I want users to be able to cherry-pick an arbitrary patch or set of patches to play with and review. When I get a firm understanding of how hg works, I intend to write some PHP scripts or something to pull a branch plus a selected set of patches into a workspace for a player to be able to run the HTML5 code for review.

已经能够:

  1. 在SourceForge上创建存储库 http://sourceforge.net/p/iotabuildit/wiki/主页,我原本以为我会托管所有内容.
  2. 将我所有的代码提交到SourceForge存储库.
  3. 意识到BitBucket可能是一个更好的托管位置(感谢 http://bitbucket.org/bluemonkmn/iotabuildit/
  4. 将BitBucket URI添加到TortoiseHg,这样我就可以将同一本地存储库与任一在线存储库一起使用.
  5. 在TortoiseHg中启用mq
  6. Q将更改提交到本地存储库的修补程序队列中.
  7. 在BitBucket上创建补丁队列存储库 http://bitbucket.org/bluemonkmn/iotabuilditmq/.
  8. 将补丁队列存储库克隆到本地存储库
  9. 将补丁文件从原始本地存储库复制到补丁队列存储库(尽管我想知道是否有更好的方法来做到这一点).
  10. 通过在执行推送之前打开--mq开关,将补丁推送到BitBucket补丁队列存储库中.
  11. 请参阅BitBucket中列出的补丁.
  12. 克隆BitBucket补丁队列存储库的新副本,并查看本地存储库中可用的补丁(以及树的其余部分).
  1. Create a repository on SourceForge http://sourceforge.net/p/iotabuildit/wiki/Home, where I originally thought I would be hosting everything.
  2. Commit all my code to the SourceForge repository.
  3. Realize that BitBucket may be a better place to host this (thanks to Recommended DVCS mechanism for hosting many independent patches) given my requirements.
  4. Import my code directly from SourceForge's Mercurial repository into BitBucket http://bitbucket.org/bluemonkmn/iotabuildit/
  5. Add the BitBucket URI to TortoiseHg so I can use the same local repository with either online repository.
  6. Enable mq in TortoiseHg
  7. QCommit a change into my local repository's patch queue.
  8. Create a patch queue repository on BitBucket http://bitbucket.org/bluemonkmn/iotabuilditmq/.
  9. Clone the patch queue repository to a local repository
  10. Copy the patch files from the original local repository into the patch queue repository (although I wonder if there's a better way to do this).
  11. Push the patches to the BitBucket patch queue repository by turning on the --mq switch before doing a push.
  12. See the patches listed in BitBucket.
  13. Clone a fresh copy of the BitBucket patch queue repository and see the patches available in the local repository (along with the rest of the tree).

无法理解或有疑问的事情是:

  1. 我是否需要在本地保留主存储库和补丁存储库?
    • 我可以/应该将补丁库与SourceForge一起使用吗? (如果可以,我可以放弃BitBucket.)
    • SourceForge是否支持mq? (SourceForge是否会像我在BitBucket上看到的那样给我一个克隆的存储库,其中包含补丁?)
    • 我可以/应该将原始存储库与BitBucket补丁存储库一起使用吗? (如果可以的话,我可能会放弃SourceForge上的存储库.)
    • 在处理用于补丁的代码时需要使用一个存储库,而在处理要正式提交的代码时需要使用另一个存储库吗?
  1. Do I need to keep both a main repository and a patch repository locally?
    • Can/should I use the patch repository with SourceForge? (If I can, I may abandon BitBucket.)
    • Does SourceForge support mq? (Will SourceForge ever give me a cloned repository with the patches sitting in it like I saw on BitBucket?)
    • Can/should I use the original repository with the BitBucket patch repository? (If I can, I may abandon the repository at SourceForge.)
    • Do I need to use one repository when working on code intended for patches and the other when working on code intended to be formally committed?
  • 我是否要在本地补丁库上执行QCommit或QNew,然后使用--mq开关进行推送?
  • 在过程中的某个时刻,我向补丁存储库提交了一个系列和一个.diff文件,这似乎有些不合时宜.这是否使我对mq和BitBucket应该如何工作的看法感到困惑?
  • 我应该将.diff文件提交到BitBucket或SourceForge上的源代码管理吗? (在某些情况下,QCommit似乎想要提交.hgignore,series和.diff文件)
  • 克隆后,用户是否应该能够在补丁存储库中看到待处理的已应用和/或未应用的补丁?
  • 一旦我删除了本地存储库中的补丁,就无法弄清楚如何从远程存储库中获取补丁而不重新克隆它,也无法弄清楚如何提交删除该补丁的操作.补丁.
  • 如果不手动复制补丁文件,就无法将补丁从我的原始存储库转移到补丁存储库中.

您可能会说,我有点迷茫,不知道要问什么问题.我怀疑答案比这些问题更简单,但是如果不知道这个问题,就很难提出正确的问题.希望一个描述补丁队列存储库性质的答案能够为我解决所有这些问题.

As you may be able to tell, I'm kind of lost, not knowing what questions to ask. I suspect the answer is simpler than these questions, but without knowing the question, it's hard to ask the right question. Hopefully one answer describing the nature of a patch queue repository will clear all this up for me.

推荐答案

回顾我的旧问题,我认为我对CVCS的了解太模糊了我对DVCS的理解.最后,我只是简单地允许其他SourceForge用户托管他们自己的存储库克隆并发布指向其存储库的链接(请参见

Reviewing my old questions, I think my understanding of DVCS was too obscured by my familiarity with CVCS. In the end I simply allowed other SourceForge users to host their own clones of my repository and publish links to their repositories (see http://sourceforge.net/p/iotabuildit/wiki/reviews/).

这篇关于对许多用户和补丁使用BitBucket上的Mercurial补丁队列存储库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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