In Mercurial (Hg), what is a good way to list all files modified by me since revision 4822?

戏子无情 提交于 2019-12-10 18:54:34

问题


I may do development work for 2 weeks before one or two features get pushed to all the production servers, and since this is a Ruby on Rails project, many files can be modified.

So using Mercurial as the source control, is there a good way to list all filenames that are modified (or added) by me, between the current version and revision 4822? (the number 4822 is before I do the first hg push, I do an hg out and see that the changeset that will go out is 4823, so I will diff with 4822)

(Update: This is to list files only modified by me, as opposed to the other 38 files modified by my teammates)

Better yet, is there a good way to invoke hg vdiff automatically, so when invoked as

checkdiff Peter 4822

It will do

hg vdiff -r 4822 [... the list of filenames modified by Peter (or me) since 4822]

回答1:


Maybe use hg log and some nice one-liner?

hg log --user Peter --verbose | grep files | sed -e 's/files://' | tr ' ' '\n' | sort | uniq will give all files modified by you since beginning of repository. Use --rev to limit revision scope.



来源:https://stackoverflow.com/questions/3400921/in-mercurial-hg-what-is-a-good-way-to-list-all-files-modified-by-me-since-rev

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