--- a/hgext/largefiles/lfutil.py Tue Oct 11 14:01:24 2011 +0200
+++ b/hgext/largefiles/lfutil.py Tue Oct 11 21:11:01 2011 -0400
@@ -58,6 +58,20 @@
# -- Private worker functions ------------------------------------------
+def getminsize(ui, assumelfiles, opt, default=10):
+ lfsize = opt
+ if not lfsize and assumelfiles:
+ lfsize = ui.config(longname, 'size', default=default)
+ if lfsize:
+ try:
+ lfsize = int(lfsize)
+ except ValueError:
+ raise util.Abort(_('largefiles: size must be an integer, was %s\n')
+ % lfsize)
+ if lfsize is None:
+ raise util.Abort(_('minimum size for largefiles must be specified'))
+ return lfsize
+
def link(src, dest):
try:
util.oslink(src, dest)