If you use Surround SCM reports, there’s a pretty good chance you have at least one saved report that runs against files in whichever repository is currently selected in the Source Tree window. Reports configured this way are great because they provide the flexibility to access the same information about files in different repositories without requiring you to create and save multiple reports. However, they do require you to remember to select the repository that includes the files you want to report on before you open the Reports dialog to actually run them. Frankly, that part of the reporting process is not super intuitive so it can be easy to forget. Luckily, Surround SCM 2016
introduces a quick and simple way to set up shortcuts to run these reports directly from the Source Tree window. Here’s all you need to do:
1. Create a plug-in for the report you want to run from the Source Tree window.
In the Reports dialog, select the report and click Create Plug-in
. The button is only enabled when a report configured to run against the <current selected> branch and <current selected> repository is selected. If you need to, you can add a new report
with this setting or duplicate an existing report
and change the branch/repository restriction in the new report.
Surround SCM creates the plug-in
and displays a message with a little information about it for reference. Make note of the plug-in name and where it is saved in case you want to modify it later
, but we’re going to stick with the default configuration right now.
2. Add the report menu item to the repository shortcut menu.
The plug-in loads automatically and a new shortcut menu item for the report is added to the user options. Choose Tools > User Options
and select the Repository Menu
category. In the Available menu items
list, look for an item with the report’s name. Add that item to the Current menu items
list, make any other changes to the items in the menu
, and click OK
3. Run the report from the Source Tree window.
Back in the Source Tree window, right-click a repository that includes files you want to report on and choose the report item.
The report runs, and you didn’t even have to open the Reports dialog first. How convenient is that?!
Interested in more custom shortcut menu items?
Be sure to check out our other blog post about creating and installing your own plug-ins to add custom shortcut menu items or entire menus for third-party application functionality to Surround SCM