Mercurial > hg-git
comparison hggit/hg2git.py @ 1063:ae5759bf5bcd
config: register git.blockdotgit
author | Kevin Bullock <kbullock@ringworld.org> |
---|---|
date | Tue, 24 Oct 2017 14:14:25 -0500 |
parents | 1b8d70c2bbfa |
children | 8ed6c0cae9b8 |
comparison
equal
deleted
inserted
replaced
1062:c249de74742b | 1063:ae5759bf5bcd |
---|---|
54 base, tail = c.split('~', 1) | 54 base, tail = c.split('~', 1) |
55 if tail.isdigit() and base.upper().startswith('GIT'): | 55 if tail.isdigit() and base.upper().startswith('GIT'): |
56 dangerous = True | 56 dangerous = True |
57 break | 57 break |
58 if dangerous: | 58 if dangerous: |
59 if ui.configbool('git', 'blockdotgit', True): | 59 if compat.config(ui, 'bool', 'git', 'blockdotgit'): |
60 raise hgutil.Abort( | 60 raise hgutil.Abort( |
61 ('Refusing to export likely-dangerous path %r' % path), | 61 ('Refusing to export likely-dangerous path %r' % path), |
62 hint=("If you need to continue, read about CVE-2014-9390 and " | 62 hint=("If you need to continue, read about CVE-2014-9390 and " |
63 "then set '[git] blockdotgit = false' in your hgrc.")) | 63 "then set '[git] blockdotgit = false' in your hgrc.")) |
64 ui.warn('warning: path %r contains a potentially dangerous path ' | 64 ui.warn('warning: path %r contains a potentially dangerous path ' |