# HG changeset patch # User Martin Bornhold # Date 2016-08-01 13:39:34 # Node ID 9193199da05cd016c5ec5e1f9ed5cee62bb583a2 # Parent c499f7782e5c9a95b45f7842260094e5c9e532a7 vcs: Add method to return the base path to the repo store. diff --git a/rhodecode/lib/utils.py b/rhodecode/lib/utils.py --- a/rhodecode/lib/utils.py +++ b/rhodecode/lib/utils.py @@ -484,6 +484,16 @@ def get_rhodecode_realm(): return safe_str(realm.app_settings_value) +def get_rhodecode_base_path(): + """ + Returns the base path. The base path is the filesystem path which points + to the repository store. + """ + from rhodecode.model.settings import SettingsModel + paths_ui = SettingsModel().get_ui_by_section_and_key('paths', '/') + return safe_str(paths_ui.ui_value) + + def map_groups(path): """ Given a full path to a repository, create all nested groups that this