What does a mercurial revision with no parent mean?

后端 未结 2 1799
自闭症患者
自闭症患者 2021-02-15 15:07

I have a Mercurial repository that is in a strange state now. This is what it looks like in TortoiseHG:

\"Hg

2条回答
  •  夕颜
    夕颜 (楼主)
    2021-02-15 15:40

    Another way to see this is if you did hg update null after committing rev. 53. For example, consider this sequence:

    hg init foo
    # create some files
    hg addremove
    hg commit -m "Revision 0"
    # edit, edit, edit
    hg commit -m "Revision 1"
    hg update null
    hg tag -m "Create tag v1.0.0.0" "v1.0.0.0"
    

    At this point, hg log will show revision 2's parent as -1:0000000000. Since hg update null clears out the working directory, the only file in it would be .hgtags (just like you were seeing).

    Did you have other tags prior to rev. 53? If my suspicion is correct, they would not be present in your rev. 54 .hgtags.

提交回复
热议问题