[PATCH 02 of 13] largefiles: remove overly complex handling of ignored and unknown files

Kevin Bullock kbullock+mercurial at ringworld.org
Fri Dec 21 19:22:50 UTC 2012


On Dec 21, 2012, at 1:06 PM, Mads Kiilerich wrote:

> # HG changeset patch
> # User Mads Kiilerich <madski at unity3d.com>
> # Date 1355422746 -3600
> # Node ID f25956852c892c774c8bc822967a4a2233ae1cb2
> # Parent  b35a5b6dead73e2503c09ca94a57ad912b9d3451
> largefiles: remove overly complex handling of ignored and unknown files
> 
> diff --git a/hgext/largefiles/reposetup.py b/hgext/largefiles/reposetup.py
> --- a/hgext/largefiles/reposetup.py
> +++ b/hgext/largefiles/reposetup.py
> @@ -188,17 +188,11 @@
>                         match._files = [f for f in match._files
>                                         if sfindirstate(f)]
>                         # Don't waste time getting the ignored and unknown
> -                        # files again; we already have them
> +                        # files from lfdirstate
>                         s = lfdirstate.status(match, [], False,
>                                 listclean, False)
> -                        (unsure, modified, added, removed, missing, unknown,
> -                                ignored, clean) = s
> -                        # Replace the list of ignored and unknown files with
> -                        # the previously calculated lists, and strip out the
> -                        # largefiles
> -                        lfiles = set(lfdirstate._map)
> -                        ignored = set(result[5]).difference(lfiles)
> -                        unknown = set(result[4]).difference(lfiles)
> +                        (unsure, modified, added, removed, missing, _unknown,
> +                                _ignored, clean) = s

Why are we renaming unknown and ignored here? (Looks to me like the values get thrown away? If so, there should be a comment to that effect.)

>                         if parentworking:
>                             for lfile in unsure:
>                                 standin = lfutil.standin(lfile)
> @@ -229,6 +223,7 @@
>                         # Replace the original ignore function
>                         lfdirstate._ignore = origignore
> 
> +                    # Standins no longer found in lfdirstate has been removed
                                                                have been

>                     for standin in ctx1.manifest():
>                         if not lfutil.isstandin(standin):
>                             continue
> @@ -243,20 +238,17 @@
> 
>                     # Largefiles are not really removed when they're
>                     # still in the normal dirstate. Likewise, normal
> -                    # files are not really removed if it's still in
> +                    # files are not really removed if they are still in

Unrelated grammar fix.

Looks good otherwise.

pacem in terris / мир / शान्ति / ‎‫سَلاَم‬ / 平和
Kevin R. Bullock




More information about the Mercurial-devel mailing list