Creating a mercurial log for a specific branch

对着背影说爱祢 提交于 2019-12-18 18:36:28

问题


Is it possible to pull changes for just a single branch vs. the entire repository. We have parallel development on different branches and do not want changes from another build in the log.

hg log -r %baseversion%:%releaseversion% --style changelog >> hglog.txt

I tried doing this this way but it pulled every change between the base tag and the release tag.


回答1:


If you're using proper hg branches, then you should be able to use the --only-branch option:

hg log --only-branch my_branch

That will show the changesets only for a given branch.

Edit: Looks like "--only-branch" is deprecated, but depending on the version of mercurial you use it will still be there. See https://www.mercurial-scm.org/repo/hg/help/log . If your mercurial is too new, you may only have the "-b"/"--branch" option.




回答2:


Also, to show logs only for current branch, ou can use dot instead of current branch name hg log --branch .




回答3:


Follow-up @criswell

Funny, hg help log know nothing about "--only-branch" option, but note -b|--branch BRANCHNAME Also, for worst cases, branch() function in revsets



来源:https://stackoverflow.com/questions/12957604/creating-a-mercurial-log-for-a-specific-branch

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