hgext/largefiles/lfcommands.py
changeset 15227 a7686abf73a6
parent 15224 7c604d8c7e83
child 15228 ee625de3541e
equal deleted inserted replaced
15226:2223ea21c98f 15227:a7686abf73a6
    31 
    31 
    32     if opts['tonormal']:
    32     if opts['tonormal']:
    33         tolfile = False
    33         tolfile = False
    34     else:
    34     else:
    35         tolfile = True
    35         tolfile = True
    36         size = opts['size']
    36         size = lfutil.getminsize(ui, True, opts.get('size'), default=None)
    37         if not size:
       
    38             size = ui.config(lfutil.longname, 'size', default=None)
       
    39             try:
       
    40                 size = int(size)
       
    41             except ValueError:
       
    42                 raise util.Abort(_('largefiles.size must be integer, was %s\n')
       
    43                                  % size)
       
    44             except TypeError:
       
    45                 raise util.Abort(_('size must be specified'))
       
    46 
       
    47     try:
    37     try:
    48         rsrc = hg.repository(ui, src)
    38         rsrc = hg.repository(ui, src)
    49         if not rsrc.local():
    39         if not rsrc.local():
    50             raise util.Abort(_('%s is not a local Mercurial repo') % src)
    40             raise util.Abort(_('%s is not a local Mercurial repo') % src)
    51     except error.RepoError, err:
    41     except error.RepoError, err: