开发者

Searching a Mercurial repository (TortoiseHG)?

Is there any way I can enter a particular filename - e.g. "xyz.txt" - and 开发者_如何学JAVAsearch for any checkins of that file within a Mercurial repository using TortoiseHG?

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


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. If you want to search your entire directory structure (rather than just the folder you are currently in) then add "**" (e.g. **xyz.txt).


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.


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜