How can I find my working revision in mercurial

前端 未结 6 586
独厮守ぢ
独厮守ぢ 2021-02-01 12:27

In a mercurial repo I can run hg up {revision} to change the revision of my working directory, but what command can I run to discover what revision I\'m looking at?

6条回答
  •  情深已故
    2021-02-01 13:05

    Another option is to enable the graphlog extension, then run hg glog. You'll see output like this (bear in mind I use a template to change the output):

    o    changeset:   200:c8c281cf0a6d
    |\   branch:      craig-aspinall
    | |  tag:         tip
    | |  parent:      199:1a692f3b9134
    | |  parent:      187:2d0e0ed9d31c
    | |  user:        Craig Aspinall
    | |  date:        Tue Nov 23 21:36:30 2010 +1000
    | |  summary:     Merged latest changes
    | |
    | o  changeset:   199:1a692f3b9134
    | |  branch:      craig-aspinall
    | |  parent:      123:1dc90c9b7ede
    | |  user:        Craig Aspinall
    | |  date:        Tue Nov 23 21:35:22 2010 +1000
    | |  summary:     Final solutions to L04
    | |
    | | @    changeset:   198:78b488c2607d       <==== This is where I am currently.
    | | |\   branch:      OJ
    | | | |  parent:      119:70ec3d9e4d3a
    | | | |  parent:      197:44bac809d37d
    | | | |  user:        OJ Reeves
    | | | |  date:        Tue Nov 23 20:19:07 2010 +1000
    | | | |  summary:     Merged with the mainline
    | | | |
    | | | o  changeset:   197:44bac809d37d
    | | | |  user:        Tony Morris
    | | | |  date:        Tue Nov 23 18:40:03 2010 +1000
    | | | |  summary:     Started parallel anagrams
    | | | |
    | | | o  changeset:   196:92241b51970b
    | | | |  user:        Tony Morris
    | | | |  date:        Tue Nov 23 17:52:32 2010 +1000
    | | | |  summary:     Started parallel anagrams
    | | | |
    

    The node/revision with the @ symbol is where you are.

提交回复
热议问题