# HG changeset patch # User Pierre-Yves David # Date 1669959737 -3600 # Node ID 8d0a220caee5d1868d8382ada81f5faaf57e2b00 # Parent 0058c74d7f729925e75f8abeab4af9ad24484393 path: pass `path` to `peer` in largefiles We directly use the `path` object to build the `peer` object. diff -r 0058c74d7f72 -r 8d0a220caee5 hgext/largefiles/storefactory.py --- a/hgext/largefiles/storefactory.py Fri Dec 02 06:38:03 2022 +0100 +++ b/hgext/largefiles/storefactory.py Fri Dec 02 06:42:17 2022 +0100 @@ -36,22 +36,23 @@ b'lfpullsource', repo, ui, lfpullsource ) else: - path, _branches = urlutil.get_unique_pull_path( - b'lfpullsource', repo, ui, lfpullsource + path = urlutil.get_unique_pull_path_obj( + b'lfpullsource', ui, lfpullsource ) # XXX we should not explicitly pass b'default', as this will result in # b'default' being returned if no `paths.default` was defined. We # should explicitely handle the lack of value instead. if repo is None: - path, _branches = urlutil.get_unique_pull_path( - b'lfs', repo, ui, b'default' + path = urlutil.get_unique_pull_path_obj( + b'lfs', + ui, + b'default', ) remote = hg.peer(repo or ui, {}, path) - elif path == b'default-push' or path == b'default': + elif path.loc == b'default-push' or path.loc == b'default': remote = repo else: - path, _branches = urlutil.parseurl(path) remote = hg.peer(repo or ui, {}, path) # The path could be a scheme so use Mercurial's normal functionality