Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how to use tortoisehg's search tools?

I want to search for a specific phrase (ie "comma_delimited") in a specific file (ie "index.php") in a specific branch (ie "ABC-123"). The reason for this is, that text is no longer in the file, and I want to see at which commit it was taken out, without looking at every revision of this file on this branch.

Is there a way to do this in tortoisehg? I see there is a Search button which brings up a search panel where you can enter patterns, but I have no clue how to use it (and don't know how to write patterns), and after googling for some time, found no useful info on it.

Thanks

like image 644
esther h Avatar asked Jun 12 '12 09:06

esther h


People also ask

What is TortoiseHg used for?

What is TortoiseHg? TortoiseHg is a Windows shell extension and a series of applications for the Mercurial distributed revision control system that includes a Gnome/Nautilus extension and a CLI wrapper application to be able to used on non-Windows platforms.

How do you commit in TortoiseHg?

From the revision history viewer (TortoiseHg ‣ Workbench or thg log) open the context menu over the changeset which you want to merge and select Merge with local…. Finally, in the merge dialog, press Merge and then Commit.

Is TortoiseHg open source?

It is free software released under the GNU General Public License. TortoiseHg can be used as a client to a git server.


1 Answers

There are two search buttons - one to search the repository and the other is to filter the revision graph. Maybe you pressed the wrong one?

If you use the menu to select View / Search this selects the search view that you want.

It should show you a large panel below the revision graph with a number of controls to fill in.

  • Enter "comma_delimited" into the first edit control (on the same line as the Search and Stop buttons which are on the right)
  • Select the "All History" radio button below that edit control.
  • Enter **index.php into the edit control labelled "Includes" (or the full path to index.php if you have more than one and want to limit the search to a particular file)
  • Press the Search button

The list at the bottom of the window should now show details of the revisions that include that phrase. It will show when it was added (prefixed with a '+') and when it was removed (prefixed with a '-')

Here's an example search window: Example search window

like image 72
Steve Kaye Avatar answered Sep 28 '22 12:09

Steve Kaye