Mercurial > hg
comparison hgext/remotenames.py @ 37983:b9e6b71dc272
remotenames: enable the storage config option if extension is enabled
Before this patch, the config option to store remotenames was set to False by
default and remotenames extension does not set it True. So if you enable
remotenames extension without setting 'experimental.remotenames=True', you won't
get the remotenames.
This patch makes remotenames enable the config option if then extension is
enabled which makes sense.
Differential Revision: https://phab.mercurial-scm.org/D3520
author | Pulkit Goyal <7895pulkit@gmail.com> |
---|---|
date | Sun, 29 Apr 2018 22:27:05 +0530 |
parents | 678ab0de7296 |
children | 25cc5616adc9 |
comparison
equal
deleted
inserted
replaced
37982:7465b908d305 | 37983:b9e6b71dc272 |
---|---|
247 | 247 |
248 def extsetup(ui): | 248 def extsetup(ui): |
249 extensions.wrapfunction(bookmarks, '_printbookmarks', wrapprintbookmarks) | 249 extensions.wrapfunction(bookmarks, '_printbookmarks', wrapprintbookmarks) |
250 | 250 |
251 def reposetup(ui, repo): | 251 def reposetup(ui, repo): |
252 | |
253 # set the config option to store remotenames | |
254 repo.ui.setconfig('experimental', 'remotenames', True, 'remotenames-ext') | |
255 | |
252 if not repo.local(): | 256 if not repo.local(): |
253 return | 257 return |
254 | 258 |
255 repo._remotenames = remotenames(repo) | 259 repo._remotenames = remotenames(repo) |
256 ns = namespaces.namespace | 260 ns = namespaces.namespace |