4.4  An Example

Let us suppose that you want to find all of the C++ source code files modified by one of the Monotone developers, me@thomaskeller.biz, in the last 10 years that contain the text “roster” (for the sake of argument we will assume that the Find Files button was clicked whilst viewing the top level directory of the revision tagged with monotone-0.42). This is how you would go about doing the search:

  • Make sure that Name tab is visible.

  • Enter *.[cC][cp]* into the Files named combobox entry field. Although not fool proof, we will assume all C++ source code files have the extensions .cc, .cpp or .C which they seem to do on the Monotone project.

  • Check that Case sensitive is unticked and Search subdirectories is ticked.

  • Switch to the Contents tab.

  • Enter roster into the Files containing combobox entry field.

  • Check that Case sensitive, Regular expression and Search binary files are unticked.

  • Switch to the Properties tab.

  • Check that Find files created or modified is ticked and during the previous is selected.

  • Enter 10 into the during the previous entry field.

  • Select Year(s) in the adjacent combobox.

  • Make sure the File size is combobox is set to Any Size.

  • Enter me@thomaskeller.biz into the Files last modified by combobox entry field.

  • Left click on the   button to execute the query.

Assuming that you then selected a file listed in the Results panel, then you should end up with a Find Files window looking something like that shown in the figure below.

Figure 4-2  An Example Of A Find Files Query
  1. Double left clicking on a file will display the file's contents in a new Monotone Browser window.

  2. Some queries can take a long time to execute depending upon the nature of the search and the number of files being searched. However the next time such a query is made, the speed will be greatly increased. This is because Monotone Browser caches certain information after the first search. This cache is only cleared when the currently selected revision is replaced in the parent Monotone Browser window.