repowidget: add setting to automatically refresh the status list when it is shown
A new thg/refreshwdstatus setting has been introduced. This setting can have
- auto: This is the default, and is the behavior up to this revision.
Refresh the status widget automatically, except when thg performs an
action that is certain to have modified the working directory status
- always: Always refresh the status whenever the user clicks on the commit button
on the task toolbar or when the user clicks on the "Working Directory"
- local: Same as "always", but only for local (i.e. non network) repositories.
The default is setting is 'auto'.
- No GUI for this setting has been added on this revision (will be done later).
- This solves a long standing issue in which TortoiseHg does not always detect
changes on the working copy. The only solution up until now was to click the
refresh button whenever you thought that the status window was not up to date.
This patch introduces an alternative, where the user can force the automatic
refresh of the status list whenever he switches to the commit widget.
The downside of enabling this setting is that it may slow down TortoiseHg in
very big repos, particularly if they are networked. However, I think that making
this a configurable behaviour, with the default being set to not refresh the
commit automatically, properly addresses the problem. If the user thinks that
the trade off of convenience vs performance is worth it he can set this setting.
If he doesn't the behavior of TortoiseHg will not change. In addition it is
possible to enable the auto refresh for local repos only.
- The approach taken on this patch may result in refreshing the status
widget twice when thg detects that there has been a change and automatically
reloads the status widget.