mirror of
https://github.com/facebook/sapling.git
synced 2024-10-07 07:17:55 +03:00
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.
This commit is contained in:
parent
9f1bd9a3e0
commit
312e37cc1e
@ -97,7 +97,8 @@ def buildmetadata(ctx):
|
||||
)
|
||||
|
||||
opts = {
|
||||
'template': default
|
||||
'template': repo.ui.config('experimental', 'archivemetatemplate',
|
||||
default)
|
||||
}
|
||||
|
||||
out = util.stringio()
|
||||
|
@ -263,6 +263,12 @@ A deleted subrepo file is flagged as dirty, like the top level repo
|
||||
$ 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' .
|
||||
|
Loading…
Reference in New Issue
Block a user