Searching a Mercurial repository (TortoiseHG)?

独自空忆成欢 提交于 2019-12-10 22:02:23

问题


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?


回答1:


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).




回答2:


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.




回答3:


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.



来源:https://stackoverflow.com/questions/3155367/searching-a-mercurial-repository-tortoisehg

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!