这就是我所做的:
hg init hg qnew -m "p1" p1.patch ; some changes hg qrefresh hg qpop hg qnew -m "p2" p2.patch ; some changes hg qrefresh hg qpop现在,这两个补丁是单独的功能,彼此之间没有任何关系.它们需要彼此独立.
Now those 2 patches were separate features and have nothing to do with each other. They need to be independent of each other.
现在我愿意了(因为我只想要第一个功能)
Now I do (because I want only the 1st feature)
hg qpush p1.patch它说:
applying p2.patch applying p1.patch它给了我两者我所做的更改!
and it gives me both the changes I made !
我做错什么了吗?
当我告诉它推送特定补丁时,它也会推送其他补丁.
It pushes other patches also when I tell it to push a specific patch.
推荐答案您忘记了一件事:MQ补丁集是 queue (队列).即,如果您可以在hg qseries中看到多个补丁,则必须记住-qpush | qpop将应用|不应用补丁,而不是按随机顺序,而是按顺序:从下往上推动,以相反顺序弹出
You forgot one thing: set of MQ-patches is queue (FIFO queue). I.e if you can see more than one patch in hg qseries, you have to remember - qpush|qpop will apply|unapply patches not in random order, but in sequential order: push from bottom to top, pop in reverse order
qpush的--move选项是随机访问(以及更改系列补丁的顺序作为副作用).您的情况(一次只使用一个补丁)和补丁名称
Random access (and changing order of patches in a series as side effect) is --move option for qpush. In your case (using only one patch at a time) and patches names
- hg qpop -a
- hg qpush --move p1.patch
- hg qpop -a
- hg qpush --move p2.patch
- hg qpop -a
- hg qpush --move p1.patch
- hg qpop -a
- hg qpush --move p2.patch
为了避免错误,您可以在别名部分重新定义qpush(对于此存储库),以始终使用--move选项
In order to avoid mistakes you can redefine qpush (for this repository) in aliases section for always use --move option
更多推荐
如何仅在Mercurial队列中推送一个特定补丁?
发布评论