Function history with Mercurial

Viewed 249

I'd like to be able to get the complete history of a function or a particular text block inside my code.

I know i can have the diffs of all my commits on a particular file, but I only want to follow the life of a particular small block of text inside my files (a C++ function for instance).

I want to see it change though past revisions, no matter if is moved inside the file or to another file or even renamed (the rest of the function remaining more or less the same when renaming)

I heard Mercurial could do this easily thanks to its proper recording of history, but I don't remember where I heard that (in my dreams ?) and I can't find any tool or way to do that except the traditional history and diff tools. Maybe I don't search with the right keywords... Anyone can help ?

Thanks

PS: I still use SVN for other projects, and if someone knows a way to accomplish the same thing with SVN, I take it too :-)

2 Answers
Related