# HG changeset patch # User Matt Harbison # Date 1500266969 14400 # Node ID 8074e2d006c06bc589f6b64a04e3f077100c8463 # Parent 4c4e95cae33a14943095e0c7e955fa238d9ca25c archive: add an experimental config to control the metadata file template Experimental because given the possible complexity, it may be worth figuring out how to load this from a file, similar to the style files for the log command, instead of trying to stuff it on the command line. diff -r 4c4e95cae33a -r 8074e2d006c0 mercurial/archival.py --- a/mercurial/archival.py Sun Jul 16 17:40:36 2017 -0400 +++ b/mercurial/archival.py Mon Jul 17 00:49:29 2017 -0400 @@ -97,7 +97,8 @@ ) opts = { - 'template': default + 'template': repo.ui.config('experimental', 'archivemetatemplate', + default) } out = util.stringio() diff -r 4c4e95cae33a -r 8074e2d006c0 tests/test-subrepo-deep-nested-change.t --- a/tests/test-subrepo-deep-nested-change.t Sun Jul 16 17:40:36 2017 -0400 +++ b/tests/test-subrepo-deep-nested-change.t Mon Jul 17 00:49:29 2017 -0400 @@ -263,6 +263,12 @@ $ hg update -Cq . $ rm -r ../wdir + $ hg archive -S -qr 'wdir()' ../wdir \ + > --config 'experimental.archivemetatemplate=archived {node|short}\n' + $ cat ../wdir/.hg_archival.txt + archived ffffffffffff + $ rm -r ../wdir + .. but first take a detour through some deep removal testing $ hg remove -S -I 're:.*.txt' .