[PATCH 2 of 2] subrepo: return only the manifest keys from hgsubrepo.files()

Martin von Zweigbergk martinvonz at google.com
Sat Feb 28 05:58:20 UTC 2015


This series LGTM.

I could only find one subrepo class that returns paths, namely the
svnsubrepo (the gitsubrepo seems not to be implemented). But the new return
value is also in line with the docstring, which says "return filename
iterator".

On Fri, Feb 27, 2015 at 9:49 PM Matt Harbison <mharbison72 at gmail.com> wrote:

> # HG changeset patch
> # User Matt Harbison <matt_harbison at yahoo.com>
> # Date 1424039350 18000
> #      Sun Feb 15 17:29:10 2015 -0500
> # Node ID 31179e583de4692c966819b4fea6f14286921b67
> # Parent  d36fb8953555e4e0c7849b1f9e7b61a31e790c28
> subrepo: return only the manifest keys from hgsubrepo.files()
>
> This is in line with the other subrepo classes (i.e. only the filenames are
> returned).  Archive iterates over the manifest keys, and since subrepo
> archive()
> uses this method, it does too now.  This will allow largefiles to override
> its
> manifest keys to present the largefiles instead of the standins.  Once in
> place,
> we shouldn't need the copy/paste overrides of archive and subrepo archive
> in
> largefiles, that don't quite behave like the core methods they are
> overriding.
>
> diff --git a/mercurial/subrepo.py b/mercurial/subrepo.py
> --- a/mercurial/subrepo.py
> +++ b/mercurial/subrepo.py
> @@ -836,7 +836,7 @@
>      def files(self):
>          rev = self._state[1]
>          ctx = self._repo[rev]
> -        return ctx.manifest()
> +        return ctx.manifest().keys()
>
>      def filedata(self, name):
>          rev = self._state[1]
> _______________________________________________
> Mercurial-devel mailing list
> Mercurial-devel at selenic.com
> http://selenic.com/mailman/listinfo/mercurial-devel
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mercurial-scm.org/pipermail/mercurial-devel/attachments/20150228/4260a236/attachment-0002.html>


More information about the Mercurial-devel mailing list