在Mercurial(Hg)中,什么是列出自4822版以来我修改的所有文件的好方法? [英] In Mercurial (Hg), what is a good way to list all files modified by me since revision 4822?
问题描述
在将一两个功能推向所有生产服务器之前,我可能要进行2周的开发工作,并且由于这是Ruby on Rails项目,因此可以修改许多文件.
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.
因此,使用Mercurial作为源代码管理器,有什么好办法可以列出在当前版本和修订版4822之间由我修改(或添加)的所有文件名? (数字4822在执行第一个hg push
之前,我在执行hg out
,然后将要看到的变更集是4823,所以我将与4822进行比较)
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)
(更新:这是列出仅由我修改的文件,而不是我的队友修改的其他38个文件)
更好的是,有一种自动调用hg vdiff
的好方法,因此当以
调用时
Better yet, is there a good way to invoke hg vdiff
automatically, so when invoked as
checkdiff Peter 4822
会的
hg vdiff -r 4822 [... the list of filenames modified by Peter (or me) since 4822]
推荐答案
也许使用hg log
和一些不错的单线?
Maybe use hg log
and some nice one-liner?
hg log --user Peter --verbose | grep files | sed -e 's/files://' | tr ' ' '\n' | sort | uniq
将提供自存储库开始以来您修改的所有文件.使用--rev
限制修订范围.
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.
这篇关于在Mercurial(Hg)中,什么是列出自4822版以来我修改的所有文件的好方法?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!