Show More
@@ -127,6 +127,23 b' def debugancestor(ui, repo, *args):' | |||||
127 | ui.write(b'%d:%s\n' % (r.rev(a), hex(a))) |
|
127 | ui.write(b'%d:%s\n' % (r.rev(a), hex(a))) | |
128 |
|
128 | |||
129 |
|
129 | |||
|
130 | @command(b'debugantivirusrunning', []) | |||
|
131 | def debugantivirusrunning(ui, repo): | |||
|
132 | """attempt to trigger an antivirus scanner to see if one is active""" | |||
|
133 | with repo.cachevfs.open('eicar-test-file.com', b'wb') as f: | |||
|
134 | f.write( | |||
|
135 | util.b85decode( | |||
|
136 | # This is a base85-armored version of the EICAR test file. See | |||
|
137 | # https://en.wikipedia.org/wiki/EICAR_test_file for details. | |||
|
138 | b'ST#=}P$fV?P+K%yP+C|uG$>GBDK|qyDK~v2MM*<JQY}+dK~6+LQba95P' | |||
|
139 | b'E<)&Nm5l)EmTEQR4qnHOhq9iNGnJx' | |||
|
140 | ) | |||
|
141 | ) | |||
|
142 | # Give an AV engine time to scan the file. | |||
|
143 | time.sleep(2) | |||
|
144 | util.unlink(repo.cachevfs.join('eicar-test-file.com')) | |||
|
145 | ||||
|
146 | ||||
130 | @command(b'debugapplystreamclonebundle', [], b'FILE') |
|
147 | @command(b'debugapplystreamclonebundle', [], b'FILE') | |
131 | def debugapplystreamclonebundle(ui, repo, fname): |
|
148 | def debugapplystreamclonebundle(ui, repo, fname): | |
132 | """apply a stream clone bundle file""" |
|
149 | """apply a stream clone bundle file""" |
@@ -74,6 +74,7 b' Do not show debug commands if there are ' | |||||
74 | Show debug commands if there are no other candidates |
|
74 | Show debug commands if there are no other candidates | |
75 | $ hg debugcomplete debug |
|
75 | $ hg debugcomplete debug | |
76 | debugancestor |
|
76 | debugancestor | |
|
77 | debugantivirusrunning | |||
77 | debugapplystreamclonebundle |
|
78 | debugapplystreamclonebundle | |
78 | debugbackupbundle |
|
79 | debugbackupbundle | |
79 | debugbuilddag |
|
80 | debugbuilddag | |
@@ -261,6 +262,7 b' Show all commands + options' | |||||
261 | continue: dry-run |
|
262 | continue: dry-run | |
262 | copy: forget, after, at-rev, force, include, exclude, dry-run |
|
263 | copy: forget, after, at-rev, force, include, exclude, dry-run | |
263 | debugancestor: |
|
264 | debugancestor: | |
|
265 | debugantivirusrunning: | |||
264 | debugapplystreamclonebundle: |
|
266 | debugapplystreamclonebundle: | |
265 | debugbackupbundle: recover, patch, git, limit, no-merges, stat, graph, style, template |
|
267 | debugbackupbundle: recover, patch, git, limit, no-merges, stat, graph, style, template | |
266 | debugbuilddag: mergeable-file, overwritten-file, new-file |
|
268 | debugbuilddag: mergeable-file, overwritten-file, new-file |
@@ -971,6 +971,8 b' Test list of internal help commands' | |||||
971 |
|
971 | |||
972 | debugancestor |
|
972 | debugancestor | |
973 | find the ancestor revision of two revisions in a given index |
|
973 | find the ancestor revision of two revisions in a given index | |
|
974 | debugantivirusrunning | |||
|
975 | attempt to trigger an antivirus scanner to see if one is active | |||
974 | debugapplystreamclonebundle |
|
976 | debugapplystreamclonebundle | |
975 | apply a stream clone bundle file |
|
977 | apply a stream clone bundle file | |
976 | debugbackupbundle |
|
978 | debugbackupbundle |
General Comments 0
You need to be logged in to leave comments.
Login now