views:

57

answers:

3

Is there any way I can enter a particular filename - e.g. "xyz.txt" - and search for any checkins of that file within a Mercurial repository using TortoiseHG?

If not, why not? Isn't this what version control is for?

A: 

In the log window (hgtk log), select the 'Filter' button.

In the dialog that comes up, specify the filename you want to filter. The filename seems to be a little finicky though.

John Weldon
+1  A: 

In the "Hg Repository Explorer" window choose the "File Patterns" filter in the combo box and type the name of the file (e.g., xyz.txt) in the field next to it and hit return. You would now see only the revisions where xyz.txt was modified.

Dheeraj
+1  A: 

This is nearly the same as the accepted answer, but instead of typing the name into the "file patterns" box, you could also right-click on the file in the Windows Explorer and open the Repository Explorer from there.

When you open it this way (in contrast to right-clicking on the folder), the Repository Explorer opens with the filter already active (and you see only the revisions where your file was modified).

--> The result is exactly the same, but I prefer this way because I don't have to type the filename by hand.

haarrrgh