changeset 15228:ee625de3541e

largefiles: allow minimum size to be a float Some old-fashioned people (e.g. me) think that incompressible binary files >100 kB count as "large".
author Greg Ward <greg@gerg.ca>
date Tue, 11 Oct 2011 21:07:08 -0400
parents a7686abf73a6
children 89e19ca2a90e
files hgext/largefiles/lfcommands.py hgext/largefiles/lfutil.py
diffstat 2 files changed, 3 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/hgext/largefiles/lfcommands.py	Tue Oct 11 21:11:01 2011 -0400
+++ b/hgext/largefiles/lfcommands.py	Tue Oct 11 21:07:08 2011 -0400
@@ -464,7 +464,7 @@
 
 cmdtable = {
     'lfconvert': (lfconvert,
-                  [('s', 'size', 0, 'All files over this size (in megabytes) '
+                  [('s', 'size', '', 'All files over this size (in megabytes) '
                   'will be considered largefiles. This can also be specified '
                   'in your hgrc as [largefiles].size.'),
                   ('','tonormal',False,
--- a/hgext/largefiles/lfutil.py	Tue Oct 11 21:11:01 2011 -0400
+++ b/hgext/largefiles/lfutil.py	Tue Oct 11 21:07:08 2011 -0400
@@ -64,9 +64,9 @@
         lfsize = ui.config(longname, 'size', default=default)
     if lfsize:
         try:
-            lfsize = int(lfsize)
+            lfsize = float(lfsize)
         except ValueError:
-            raise util.Abort(_('largefiles: size must be an integer, was %s\n')
+            raise util.Abort(_('largefiles: size must be number (not %s)\n')
                              % lfsize)
     if lfsize is None:
         raise util.Abort(_('minimum size for largefiles must be specified'))