diff extensions/kwarchive.py @ 288:0080dab59fac

Begin tests with subrepos and some preparations for nested subrepos
author Franz Glasner <hg@dom66.de>
date Thu, 17 Jan 2019 09:38:19 +0100
parents 95c207d21bbf
children fd493de7a669
line wrap: on
line diff
--- a/extensions/kwarchive.py	Wed Jan 16 21:18:49 2019 +0100
+++ b/extensions/kwarchive.py	Thu Jan 17 09:38:19 2019 +0100
@@ -87,7 +87,7 @@
 import inspect
 
 from mercurial.i18n import _
-from mercurial import (archival, config, cmdutil, error, match,
+from mercurial import (archival, config, cmdutil, error, match, subrepo,
                        pycompat, scmutil, templatefilters, util, node)
 try:
     from mercurial import registrar
@@ -367,6 +367,11 @@
                 ui.write(".. |VCS%s| replace:: %s\n" % (key, file_keywords[key]))
             else:
                 ui.write("$%s: %s $\n" % (key, file_keywords[key]))
+    if opts.get("subrepos"):
+        for subpath in sorted(ctx.substate):
+            ui.write("SUBPATH: " + subpath + "\n");
+            subrep = ctx.workingsub(subpath)
+            ui.write(repr(subrep) + " " + subrepo.subrelpath(subrep) + '\n');
 
 
 def patch_archiver_class(archivername, filter):