[PATCH 3 of 9 sparse] sparse: move some temporary includes functions into core

Martin von Zweigbergk martinvonz at google.com
Thu Jul 6 18:21:35 EDT 2017


On Thu, Jul 6, 2017 at 2:54 PM, Gregory Szorc <gregory.szorc at gmail.com> wrote:
> # HG changeset patch
> # User Gregory Szorc <gregory.szorc at gmail.com>
> # Date 1499377696 25200
> #      Thu Jul 06 14:48:16 2017 -0700
> # Node ID 7bd81df5813100a0a28ac2373722cd6405b5c505
> # Parent  868fe26df6ac39fddf1decc3ceae5dc0db9248be
> sparse: move some temporary includes functions into core
>
> diff --git a/mercurial/sparse.py b/mercurial/sparse.py
> --- a/mercurial/sparse.py
> +++ b/mercurial/sparse.py
> @@ -149,3 +149,20 @@ def writeconfig(repo, includes, excludes
>                  fh.write('\n')
>
>      invalidatesignaturecache(repo)
> +
> +def readtemporaryincludes(repo):
> +    raw = repo.vfs.tryread('tempsparse')
> +    if not raw:
> +        return set()
> +
> +    return set(raw.split('\n'))
> +
> +def writetemporaryincludes(repo, includes):

Looks like this one could have preserved its leading _.


More information about the Mercurial-devel mailing list