Mercurial > hg-git
comparison hggit/hg2git.py @ 1128:6141895a53c9
compat: switch from hgutil.Abort to error.Abort
author | Kevin Bullock <kbullock@ringworld.org> |
---|---|
date | Wed, 02 May 2018 20:43:17 -0500 |
parents | bd1a01f98154 |
children |
comparison
equal
deleted
inserted
replaced
1127:108d9303ef71 | 1128:6141895a53c9 |
---|---|
5 import os | 5 import os |
6 import stat | 6 import stat |
7 | 7 |
8 import dulwich.objects as dulobjs | 8 import dulwich.objects as dulobjs |
9 from mercurial import ( | 9 from mercurial import ( |
10 util as hgutil, | 10 error, |
11 ) | 11 ) |
12 | 12 |
13 import compat | 13 import compat |
14 import util | 14 import util |
15 | 15 |
58 if tail.isdigit() and base.upper().startswith('GIT'): | 58 if tail.isdigit() and base.upper().startswith('GIT'): |
59 dangerous = True | 59 dangerous = True |
60 break | 60 break |
61 if dangerous: | 61 if dangerous: |
62 if compat.config(ui, 'bool', 'git', 'blockdotgit'): | 62 if compat.config(ui, 'bool', 'git', 'blockdotgit'): |
63 raise hgutil.Abort( | 63 raise error.Abort( |
64 ('Refusing to export likely-dangerous path %r' % path), | 64 ('Refusing to export likely-dangerous path %r' % path), |
65 hint=("If you need to continue, read about CVE-2014-9390 and " | 65 hint=("If you need to continue, read about CVE-2014-9390 and " |
66 "then set '[git] blockdotgit = false' in your hgrc.")) | 66 "then set '[git] blockdotgit = false' in your hgrc.")) |
67 ui.warn('warning: path %r contains a potentially dangerous path ' | 67 ui.warn('warning: path %r contains a potentially dangerous path ' |
68 'component.\n' | 68 'component.\n' |