2012-12-10 42 views
3

我試圖瞭解如何將我的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回購一樣操縱,但我不清楚工作流程與我正在嘗試做什麼有關。我已將別名中的mq命令替換爲hg -R $(hg root)/.hg/patches,但我希望得到關於人們如何管理遠程備份和共享未合併補丁的反饋。謝謝。

回答

1
  • hg push --mq推動的變更補丁MQ
  • mqcollab - 對MQ的容易交流和合作補丁
2

在到位桶,您可以創建存儲庫和補丁隊列。 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 

在舊版本的水銀,所述hg init --mqhg commit --mq命令作爲hg qinithg qcommit(現在被棄用)中提供。

1

您可以在您的.hg/patches中創建一個存儲庫,並將其作爲單獨的存儲庫推送。在更高版本的mercurial中,您只需執行hg ci --mq,它將提交最新版本的修補程序存儲庫。一旦它被提交,你可以將它克隆到bitbucket。