Reputation: 24480
Is there a way to generate a list of changesets that affected a particular line of a file? Annotate will let me see the last changeset to affect a particular line, I would like to chain annotations for a particular line back until it was first added.
Upvotes: 2
Views: 118
Reputation: 78330
What about:
hg grep --all symbolBeingWatched
or if you really just want the list of revisions
hg grep --all symbolBeingwatched | cut -d : -f 2 | sort -u -n
Upvotes: 3
Reputation: 97280
Extended (and slightly alternated) version of pyfunc comment, without "ready-to-use" solution, only draft, with samples from my repo
Define all changesets, which affect file (I'm lazy to write final gawk-code)
hg log --template "{rev}\n" functions.php
3 2 1 0
hg ann -r $REV functions.php | grep "load_theme_" >> string.txt
hg ann |
(none for rev 0 was grepped)
2: load_theme_textdomain('fiver', get_template_directory() . '/languages');
2: load_theme_textdomain('fiver', get_template_directory() . '/languages');
1: load_theme_textdomain('fiver', get_template_directory() . '/translation');
uniq
pipe and get final resultFrank says: thanks, that got me started, I ended up using the following from Powershell to watch what changesets affected a particular symbol:
$history = hg log --template "{rev}\n" $filename
$history | % { $_; hg log -vpr $_ $filename | select-string $symbolBeingWatched }
Upvotes: 1