Show More
@@ -513,6 +513,11 b' trusted::' | |||||
513 |
|
513 | |||
514 | ui:: |
|
514 | ui:: | |
515 | User interface controls. |
|
515 | User interface controls. | |
|
516 | archivemeta;; | |||
|
517 | Whether to include the .hg_archival.txt file containing metadata | |||
|
518 | (hashes for the repository base and for tip) in archives created by | |||
|
519 | the hg archive command or downloaded via hgweb. | |||
|
520 | Default is true. | |||
516 | debug;; |
|
521 | debug;; | |
517 | Print debugging information. True or False. Default is False. |
|
522 | Print debugging information. True or False. Default is False. | |
518 | editor;; |
|
523 | editor;; |
@@ -214,8 +214,10 b' def archive(repo, dest, node, kind, deco' | |||||
214 | m = ctx.manifest() |
|
214 | m = ctx.manifest() | |
215 | items = m.items() |
|
215 | items = m.items() | |
216 | items.sort() |
|
216 | items.sort() | |
217 | write('.hg_archival.txt', 0644, False, |
|
217 | if repo.ui.configbool("ui", "archivemeta", True): | |
218 | lambda: 'repo: %s\nnode: %s\n' % (hex(repo.changelog.node(0)), hex(node))) |
|
218 | write('.hg_archival.txt', 0644, False, | |
|
219 | lambda: 'repo: %s\nnode: %s\n' % ( | |||
|
220 | hex(repo.changelog.node(0)), hex(node))) | |||
219 | for filename, filenode in items: |
|
221 | for filename, filenode in items: | |
220 | write(filename, m.execf(filename) and 0755 or 0644, m.linkf(filename), |
|
222 | write(filename, m.execf(filename) and 0755 or 0644, m.linkf(filename), | |
221 | lambda: repo.file(filename).read(filenode)) |
|
223 | lambda: repo.file(filename).read(filenode)) |
@@ -59,7 +59,7 b' python md5comp.py tip1.tar.gz tip2.tar.g' | |||||
59 | hg archive -t zip -p /illegal test.zip |
|
59 | hg archive -t zip -p /illegal test.zip | |
60 | hg archive -t zip -p very/../bad test.zip |
|
60 | hg archive -t zip -p very/../bad test.zip | |
61 |
|
61 | |||
62 | hg archive -t zip -r 2 test.zip |
|
62 | hg archive --config ui.archivemeta=false -t zip -r 2 test.zip | |
63 | unzip -t test.zip |
|
63 | unzip -t test.zip | |
64 |
|
64 | |||
65 | hg archive -t tar - | tar tf - | sed "s/$QTIP/TIP/" |
|
65 | hg archive -t tar - | tar tf - | sed "s/$QTIP/TIP/" |
@@ -29,7 +29,6 b' test-TIP/foo' | |||||
29 | True |
|
29 | True | |
30 | abort: archive prefix contains illegal components |
|
30 | abort: archive prefix contains illegal components | |
31 | Archive: test.zip |
|
31 | Archive: test.zip | |
32 | testing: test/.hg_archival.txt OK |
|
|||
33 | testing: test/bar OK |
|
32 | testing: test/bar OK | |
34 | testing: test/baz/bletch OK |
|
33 | testing: test/baz/bletch OK | |
35 | testing: test/foo OK |
|
34 | testing: test/foo OK |
General Comments 0
You need to be logged in to leave comments.
Login now