Show More
@@ -112,11 +112,15 b' class SettingsController(BaseController)' | |||
|
112 | 112 | |
|
113 | 113 | if setting_id == 'mapping': |
|
114 | 114 | rm_obsolete = request.POST.get('destroy', False) |
|
115 | log.debug('Rescanning directories with destroy=%s' % rm_obsolete) | |
|
115 | invalidate_cache = request.POST.get('invalidate', False) | |
|
116 | log.debug('rescanning directories with destroy obsolete=%s' | |
|
117 | % (rm_obsolete,)) | |
|
116 | 118 | initial = ScmModel().repo_scan() |
|
117 | log.debug('invalidating all repositories') | |
|
118 | for repo_name in initial.keys(): | |
|
119 |
|
|
|
119 | ||
|
120 | if invalidate_cache: | |
|
121 | log.debug('invalidating all repositories cache') | |
|
122 | for repo_name in initial.keys(): | |
|
123 | ScmModel().mark_for_invalidation(repo_name) | |
|
120 | 124 | |
|
121 | 125 | added, removed = repo2db_mapper(initial, rm_obsolete) |
|
122 | 126 | _repr = lambda l: ', '.join(map(safe_unicode, l)) or '-' |
@@ -40,6 +40,12 b'' | |||
|
40 | 40 | <span class="tooltip" title="${h.tooltip(_('In case a repository was deleted from filesystem and there are leftovers in the database check this option to scan obsolete data in database and remove it.'))}"> |
|
41 | 41 | ${_('Destroy old data')}</span> </label> |
|
42 | 42 | </div> |
|
43 | <div class="checkbox"> | |
|
44 | ${h.checkbox('invalidate',True)} | |
|
45 | <label for="invalidate"> | |
|
46 | <span class="tooltip" title="${h.tooltip(_('Invalidate cache for all repositories during scan'))}"> | |
|
47 | ${_('Invalidate cache for all repositories')}</span> </label> | |
|
48 | </div> | |
|
43 | 49 | <span class="help-block">${_('Rescan repositories location for new repositories. Also deletes obsolete if `destroy` flag is checked ')}</span> |
|
44 | 50 | </div> |
|
45 | 51 | </div> |
General Comments 0
You need to be logged in to leave comments.
Login now