Patchwork lfs: drop deprecated remote store config options

login
register
mail settings
Submitter Matt Harbison
Date Jan. 13, 2018, 4:28 a.m.
Message ID <a461399d0ac31e3c4ebc.1515817721@Envy>
Download mbox | patch
Permalink /patch/26714/
State Accepted
Headers show

Comments

Matt Harbison - Jan. 13, 2018, 4:28 a.m.
# HG changeset patch
# User Matt Harbison <matt_harbison@yahoo.com>
# Date 1515816818 18000
#      Fri Jan 12 23:13:38 2018 -0500
# Node ID a461399d0ac31e3c4ebc8dee10ea0ac46843fa07
# Parent  b66e906f11f758eb3b3b0f5bc56cf66229f343b7
lfs: drop deprecated remote store config options

The last of these were removed from fb-experimental in 86884a51e9aa, and we
might as well clean this up before the freeze.
Yuya Nishihara - Jan. 13, 2018, 5:45 a.m.
On Fri, 12 Jan 2018 23:28:41 -0500, Matt Harbison wrote:
> # HG changeset patch
> # User Matt Harbison <matt_harbison@yahoo.com>
> # Date 1515816818 18000
> #      Fri Jan 12 23:13:38 2018 -0500
> # Node ID a461399d0ac31e3c4ebc8dee10ea0ac46843fa07
> # Parent  b66e906f11f758eb3b3b0f5bc56cf66229f343b7
> lfs: drop deprecated remote store config options

Queued, thanks.

Patch

diff --git a/hgext/lfs/__init__.py b/hgext/lfs/__init__.py
--- a/hgext/lfs/__init__.py
+++ b/hgext/lfs/__init__.py
@@ -71,7 +71,7 @@ 
 )
 
 configitem('lfs', 'url',
-    default=configitem.dynamicdefault,
+    default=None,
 )
 configitem('lfs', 'usercache',
     default=None,
@@ -82,18 +82,6 @@ 
 configitem('lfs', 'retry',
     default=5,
 )
-# Deprecated
-configitem('lfs', 'remotestore',
-    default=None,
-)
-# Deprecated
-configitem('lfs', 'dummy',
-    default=None,
-)
-# Deprecated
-configitem('lfs', 'git-lfs',
-    default=None,
-)
 
 cmdtable = {}
 command = registrar.command(cmdtable)
diff --git a/hgext/lfs/blobstore.py b/hgext/lfs/blobstore.py
--- a/hgext/lfs/blobstore.py
+++ b/hgext/lfs/blobstore.py
@@ -445,22 +445,7 @@ 
 
 def remote(repo):
     """remotestore factory. return a store in _storemap depending on config"""
-    defaulturl = ''
-
-    # convert deprecated configs to the new url. TODO: remove this if other
-    # places are migrated to the new url config.
-    # deprecated config: lfs.remotestore
-    deprecatedstore = repo.ui.config('lfs', 'remotestore')
-    if deprecatedstore == 'dummy':
-        # deprecated config: lfs.remotepath
-        defaulturl = 'file://' + repo.ui.config('lfs', 'remotepath')
-    elif deprecatedstore == 'git-lfs':
-        # deprecated config: lfs.remoteurl
-        defaulturl = repo.ui.config('lfs', 'remoteurl')
-    elif deprecatedstore == 'null':
-        defaulturl = 'null://'
-
-    url = util.url(repo.ui.config('lfs', 'url', defaulturl))
+    url = util.url(repo.ui.config('lfs', 'url') or '')
     scheme = url.scheme
     if scheme not in _storemap:
         raise error.Abort(_('lfs: unknown url scheme: %s') % scheme)