[PATCH] largefiles: improve comments, internal docstrings
mads at kiilerich.com
Wed Oct 12 21:39:01 CDT 2011
Greg Ward wrote, On 10/13/2011 03:55 AM:
> # HG changeset patch
> # User Greg Ward<greg at gerg.ca>
> # Date 1318467567 14400
> # Node ID af15a79d808dffe2d4e5804fe74dc87612021995
> # Parent dac2edce4e4a7eb63ff2c1bb6ab2289c0bcec9e5
> largefiles: improve comments, internal docstrings
> --- a/hgext/largefiles/lfcommands.py
> +++ b/hgext/largefiles/lfcommands.py
> @@ -6,7 +6,7 @@
> # This software may be used and distributed according to the terms of the
> # GNU General Public License version 2 or any later version.
> -'''High-level command functions: lfadd() et. al, plus the cmdtable.'''
> +'''High-level command function for lfconvert, plus the cmdtable.'''
> import os
> import shutil
> @@ -316,11 +316,9 @@
> revmap[ctx.node()] = rdst.changelog.tip()
> def _islfile(file, ctx, matcher, size):
> - '''
> - A file is a lfile if it matches a pattern or is over
> - the given size.
> - '''
> - # Never store hgtags or hgignore as lfiles
> + '''Return true if file should be considered a largefile, i.e.
> + matcher matches it or it is larger than size.'''
> + # never store special .hg* files as largefiles
> if file == '.hgtags' or file == '.hgignore' or file == '.hgsigs':
> return False
It seems like the comment now is better than the code. Shouldn't for
example .hgsub and .hgsubstate - or everything that starts with .hg - be
More information about the Mercurial-devel