Filter mercurial status by branch name
I'd like to get an hg status list for a range of revisions, and also filter the list for a given branch name.
e.g. The issue with this comma开发者_运维技巧nd is that it includes changes from multiple branches, and I'm only interested in a particular branch:hg status --rev 150:175
Is there a way to add an additional filter by branch for this list with hg or a mainstream hg tool?
You can do this using revsets:
hg status --rev "150:175 and branch(<BRANCH_NAME>)
"
I believe that you can use revsets (hg help revsets
) to do this. There are a large number of options for selecting revisions, but I think that what you want would be something along these lines:
hg status --rev "150:175 and branch(mybranch)"
Revsets can be tricky at times, but they are very powerful, and so well worth reading about them in hg help
.
精彩评论