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

Matt Harbison mharbison72 at gmail.com
Fri Feb 27 23:47:19 CST 2015


# 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]


More information about the Mercurial-devel mailing list