我正在从 Subversion 过渡到 Mercurial,我习惯使用 svnmerge.py 来跟踪已合并或已被阻止合并的更改:
# Mark change 123 as having already been merged; it will not be merged again, even if a range
# that contains it is subsequently specified.
svnmerge.py merge -M -r123
#
# Block change 326 from being considered for merges.
svnmerge.py merge -X -r326
#
# Show changes that are available for merging from the source branch.
svnmerge.py avail
#
# Do a catchall merge of the remaining changes. Neither change 123 nor change 326 will be
# considered for merging.
svnmerge.py merge
我希望能够为 hg pull/push/merge/graft 做类似的事情,这样如果我知道我永远不想合并给定的更改,我可以阻止它考虑,进行后续的挑选、合并、等等,变成了一个更加一劳永逸的事情。我已经做了很多谷歌搜索,但还没有找到一种方法来做到这一点。
似乎也无法查看尚未移植的更改列表。
由于我经常在其他开发人员之后进行整理并帮助他们进行合并,因此能够做这些事情非常有帮助,人们可能会认为这是“逆向挑选”;即,标记您不想合并的更改,然后对其余部分进行批量合并。