what does 'skipping ancestor revision' mean when using 'graft'?

时间秒杀一切 提交于 2019-12-23 08:38:27

问题


I'm using the graft command to pull 4 changesets from a BranchA into BranchB. When I do, some are grafted and some are not:

PS D:\Dev\ProjectAlpha> hg graft 5f403abb2b24
skipping ancestor revision 15911
PS D:\Dev\ProjectAlpha> hg graft 535ff712c5a3
grafting revision 15925
PS D:\Dev\ProjectAlpha> hg graft cf42b7113e02
grafting revision 15931
PS D:\Dev\ProjectAlpha> hg graft 6920922ee602
skipping ancestor revision 15910

I can't find anything documented that explains this. I can find the source, but maybe it'd be helpful to someone else if someone could come along and explain this.

Is there an order of operations with graft that I need to keep in mind? Am I doing it wrong?


回答1:


From hg help glossary:

Ancestor
    Any changeset that can be reached by an unbroken chain of parent
    changesets from a given changeset. More precisely, the ancestors of a
    changeset can be defined by two properties: a parent of a changeset is
    an ancestor, and a parent of an ancestor is an ancestor. See also:
    'Descendant'.

so graft is refusing to make those revisions descendants of your current changeset because they're already ancestors of your current changeset, and having your ancestors be your descendants was shown to not work in the Back to the Future movies. ;)



来源:https://stackoverflow.com/questions/11001666/what-does-skipping-ancestor-revision-mean-when-using-graft

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!