sreda, 07. november 2012

Find where code was changed in Mercurial

If you want to find out in which revisions a piece of code was changed then you can use a Mercurial command something like this:

hg grep --all PIECE_OF_CODE | awk 'BEGIN {FS=":"} {print $1" "$2}' | uniq
and you will get back a list of files with coresponding revisuin numbers:
repo/src/java/com/kovica/ 30
repo/src/java/com/kovica/ 10
Objavite komentar