hgext/largefiles/lfcommands.py
changeset 50880 ee393dbfe5cb
parent 50110 a860298776f0
equal deleted inserted replaced
50879:7e6cd8472dc8 50880:ee393dbfe5cb
    25     exthelper,
    25     exthelper,
    26     hg,
    26     hg,
    27     lock,
    27     lock,
    28     logcmdutil,
    28     logcmdutil,
    29     match as matchmod,
    29     match as matchmod,
    30     pycompat,
       
    31     scmutil,
    30     scmutil,
    32     util,
    31     util,
    33 )
    32 )
    34 from mercurial.utils import hashutil
    33 from mercurial.utils import hashutil
    35 
    34 
    85     repository.
    84     repository.
    86 
    85 
    87     Use --to-normal to convert largefiles back to normal files; after
    86     Use --to-normal to convert largefiles back to normal files; after
    88     this, the DEST repository can be used without largefiles at all."""
    87     this, the DEST repository can be used without largefiles at all."""
    89 
    88 
    90     opts = pycompat.byteskwargs(opts)
    89     if opts['to_normal']:
    91     if opts[b'to_normal']:
       
    92         tolfile = False
    90         tolfile = False
    93     else:
    91     else:
    94         tolfile = True
    92         tolfile = True
    95         size = lfutil.getminsize(ui, True, opts.get(b'size'), default=None)
    93         size = lfutil.getminsize(ui, True, opts.get('size'), default=None)
    96 
    94 
    97     if not hg.islocal(src):
    95     if not hg.islocal(src):
    98         raise error.Abort(_(b'%s is not a local Mercurial repo') % src)
    96         raise error.Abort(_(b'%s is not a local Mercurial repo') % src)
    99     if not hg.islocal(dest):
    97     if not hg.islocal(dest):
   100         raise error.Abort(_(b'%s is not a local Mercurial repo') % dest)
    98         raise error.Abort(_(b'%s is not a local Mercurial repo') % dest)