Mercurial > hg
comparison hgext/lfs/__init__.py @ 35100:07e97998d385
lfs: register config options
I'm not sure at what point we can get rid of the deprecated options, but for the
sake of making progress, they are registered too.
author | Matt Harbison <matt_harbison@yahoo.com> |
---|---|
date | Tue, 14 Nov 2017 01:03:22 -0500 |
parents | b8e5fb8d2389 |
children | e0a1b9ee93cd |
comparison
equal
deleted
inserted
replaced
35099:b8e5fb8d2389 | 35100:07e97998d385 |
---|---|
52 # extensions which SHIP WITH MERCURIAL. Non-mainline extensions should | 52 # extensions which SHIP WITH MERCURIAL. Non-mainline extensions should |
53 # be specifying the version(s) of Mercurial they are tested with, or | 53 # be specifying the version(s) of Mercurial they are tested with, or |
54 # leave the attribute unspecified. | 54 # leave the attribute unspecified. |
55 testedwith = 'ships-with-hg-core' | 55 testedwith = 'ships-with-hg-core' |
56 | 56 |
57 configtable = {} | |
58 configitem = registrar.configitem(configtable) | |
59 | |
60 configitem('lfs', 'url', | |
61 default=configitem.dynamicdefault, | |
62 ) | |
63 configitem('lfs', 'threshold', | |
64 default=None, | |
65 ) | |
66 configitem('lfs', 'retry', | |
67 default=5, | |
68 ) | |
69 # Deprecated | |
70 configitem('lfs', 'remotestore', | |
71 default=None, | |
72 ) | |
73 # Deprecated | |
74 configitem('lfs', 'dummy', | |
75 default=None, | |
76 ) | |
77 # Deprecated | |
78 configitem('lfs', 'git-lfs', | |
79 default=None, | |
80 ) | |
81 | |
57 cmdtable = {} | 82 cmdtable = {} |
58 command = registrar.command(cmdtable) | 83 command = registrar.command(cmdtable) |
59 | 84 |
60 templatekeyword = registrar.templatekeyword() | 85 templatekeyword = registrar.templatekeyword() |
61 | 86 |
62 def reposetup(ui, repo): | 87 def reposetup(ui, repo): |
63 # Nothing to do with a remote repo | 88 # Nothing to do with a remote repo |
64 if not repo.local(): | 89 if not repo.local(): |
65 return | 90 return |
66 | 91 |
67 threshold = repo.ui.configbytes('lfs', 'threshold', None) | 92 threshold = repo.ui.configbytes('lfs', 'threshold') |
68 | 93 |
69 repo.svfs.options['lfsthreshold'] = threshold | 94 repo.svfs.options['lfsthreshold'] = threshold |
70 repo.svfs.lfslocalblobstore = blobstore.local(repo) | 95 repo.svfs.lfslocalblobstore = blobstore.local(repo) |
71 repo.svfs.lfsremoteblobstore = blobstore.remote(repo) | 96 repo.svfs.lfsremoteblobstore = blobstore.remote(repo) |
72 | 97 |