0

我一直在阅读有关如何使用 Mercurial 的各种教程,并一直在尝试使用 hg qnew(例如 hg qnew Enumpatch.patch)创建一个包含我所做更改的补丁。然而,它只是不断提出一个空补丁。我试过四处阅读和谷歌搜索,但我并不聪明。我认为这可能是非常明显的事情。谁能帮我?

当我做 hg status 我得到:

$ hg status
M series
A Enum

所以它看不到我之前所做的更改。有没有办法纠正这个问题?

我在 Mercurial 上执行以下步骤:

$ echo >FormAssistPopup.java 
$ hg add FormAssistPopup.java 
FormAssistPopup.java already tracked!
$ hg commit -m "Enum patch."
abort: cannot commit over an applied mq patch
$ hg qnew Enum.patch
Enum.patch already tracked!

它不会让我提交已应用的补丁,但是当我尝试创建一个新补丁时,它会显示“已跟踪补丁”,尽管它已从补丁文件夹和系列文件中删除。有没有办法解决这个问题?

4

1 回答 1

0

There isn't enough information to really know what you are doing wrong, but here's the basic sequence to create a patch. Perhaps that will help:

Make a repository:

hg init example
cd example

Commit a file to it:

echo >file1
hg add file1
hg commit -m "First file."

Make some changes:

echo >>file1
echo >file2
hg add file2

Create the patch:

hg qnew mypatch

Make another change:

echo >>file2

Update the current patch:

hg qrefresh

Make another change:

echo >>file1
echo >>file2

Start a new patch:

hg qnew Patch2

Remove the most recent patch:

hg qpop
于 2013-09-21T15:16:56.327 回答