--- a/hgext/largefiles/storefactory.py Sun Oct 06 09:45:02 2019 -0400
+++ b/hgext/largefiles/storefactory.py Sun Oct 06 09:48:39 2019 -0400
@@ -31,18 +31,18 @@
if lfpullsource:
path = ui.expandpath(lfpullsource)
elif put:
- path = ui.expandpath('default-push', 'default')
+ path = ui.expandpath(b'default-push', b'default')
else:
- path = ui.expandpath('default')
+ path = ui.expandpath(b'default')
# ui.expandpath() leaves 'default-push' and 'default' alone if
# they cannot be expanded: fallback to the empty string,
# meaning the current directory.
if repo is None:
- path = ui.expandpath('default')
+ path = ui.expandpath(b'default')
path, _branches = hg.parseurl(path)
remote = hg.peer(repo or ui, {}, path)
- elif path == 'default-push' or path == 'default':
+ elif path == b'default-push' or path == b'default':
remote = repo
else:
path, _branches = hg.parseurl(path)
@@ -50,18 +50,18 @@
# The path could be a scheme so use Mercurial's normal functionality
# to resolve the scheme to a repository and use its path
- path = util.safehasattr(remote, 'url') and remote.url() or remote.path
+ path = util.safehasattr(remote, b'url') and remote.url() or remote.path
match = _scheme_re.match(path)
if not match: # regular filesystem path
- scheme = 'file'
+ scheme = b'file'
else:
scheme = match.group(1)
try:
storeproviders = _storeprovider[scheme]
except KeyError:
- raise error.Abort(_('unsupported URL scheme %r') % scheme)
+ raise error.Abort(_(b'unsupported URL scheme %r') % scheme)
for classobj in storeproviders:
try:
@@ -70,16 +70,16 @@
pass
raise error.Abort(
- _('%s does not appear to be a largefile store')
+ _(b'%s does not appear to be a largefile store')
% util.hidepassword(path)
)
_storeprovider = {
- 'file': [localstore.localstore],
- 'http': [wirestore.wirestore],
- 'https': [wirestore.wirestore],
- 'ssh': [wirestore.wirestore],
+ b'file': [localstore.localstore],
+ b'http': [wirestore.wirestore],
+ b'https': [wirestore.wirestore],
+ b'ssh': [wirestore.wirestore],
}
_scheme_re = re.compile(br'^([a-zA-Z0-9+-.]+)://')