Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
hg-git
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
mercurial
hg-git
Commits
40b5922e
Commit
40b5922e
authored
5 years ago
by
Kevin Bullock
Browse files
Options
Downloads
Patches
Plain Diff
compat: drop hfsignoreclean implementation
parent
f90fd0ac
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
hggit/compat.py
+0
-25
0 additions, 25 deletions
hggit/compat.py
hggit/hg2git.py
+2
-1
2 additions, 1 deletion
hggit/hg2git.py
with
2 additions
and
26 deletions
hggit/compat.py
+
0
−
25
View file @
40b5922e
...
...
@@ -9,31 +9,6 @@
)
try
:
from
mercurial
import
encoding
hfsignoreclean
=
encoding
.
hfsignoreclean
except
AttributeError
:
# compat with hg 3.2.1 and earlier, which doesn't have
# hfsignoreclean (This was borrowed wholesale from hg 3.2.2.)
_ignore
=
[
unichr
(
int
(
x
,
16
)).
encode
(
"
utf-8
"
)
for
x
in
"
200c 200d 200e 200f 202a 202b 202c 202d 202e
"
"
206a 206b 206c 206d 206e 206f feff
"
.
split
()]
# verify the next function will work
assert
set
([
i
[
0
]
for
i
in
_ignore
])
==
set
([
"
\xe2
"
,
"
\xef
"
])
def
hfsignoreclean
(
s
):
"""
Remove codepoints ignored by HFS+ from s.
>>>
hfsignoreclean
(
u
'
.h
\u200c
g
'
.
encode
(
'
utf-8
'
))
'
.hg
'
>>>
hfsignoreclean
(
u
'
.h
\ufeff
g
'
.
encode
(
'
utf-8
'
))
'
.hg
'
"""
if
"
\xe2
"
in
s
or
"
\xef
"
in
s
:
for
c
in
_ignore
:
s
=
s
.
replace
(
c
,
''
)
return
s
try
:
from
mercurial
import
vfs
as
vfsmod
hgvfs
=
vfsmod
.
vfs
except
ImportError
:
...
...
This diff is collapsed.
Click to expand it.
hggit/hg2git.py
+
2
−
1
View file @
40b5922e
...
...
@@ -7,6 +7,7 @@
import
dulwich.objects
as
dulobjs
from
mercurial
import
(
encoding
,
error
,
)
...
...
@@ -50,7 +51,7 @@
"""
dangerous
=
False
for
c
in
path
.
split
(
os
.
path
.
sep
):
if
compat
.
hfsignoreclean
(
c
)
==
'
.git
'
:
if
encoding
.
hfsignoreclean
(
c
)
==
'
.git
'
:
dangerous
=
True
break
elif
'
~
'
in
c
:
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment