version control - Is there a way to search ALL mercurial commits for a specific string? -
we have situation know keyword used in 1 particular mercurial commit in repository. don't know commit in. can go through each committed file , find keyword , how used, lot of tedious work.
is there way in mercurial search string across committed code in repository?
hg grep
that.
hg grep [option]... pattern [file]... search pattern in specified files , revisions search revisions of files regular expression. command behaves differently unix grep. accepts python/perl regexps. searches repository history, not working directory. prints revision number in match appears. default, grep prints output first revision of file in finds match. print every revision contains change in match status ("-" match becomes non-match, or "+" non-match becomes match), use --all flag. returns 0 if match found, 1 otherwise.
Comments
Post a Comment