Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
mercurial
mercurial-devel
Commits
19748c73c208
Commit
19748c73
authored
Jul 06, 2020
by
Jörg Sonnenberger
Browse files
manifest: use the same logic for handling flags in _parse as elsewhere
Differential Revision:
https://phab.mercurial-scm.org/D8684
parent
d0ef8c1dddd4
Changes
1
Show whitespace changes
Inline
Side-by-side
mercurial/manifest.py
View file @
19748c73
...
@@ -58,10 +58,8 @@
...
@@ -58,10 +58,8 @@
prev
=
l
prev
=
l
f
,
n
=
l
.
split
(
b
'
\0
'
)
f
,
n
=
l
.
split
(
b
'
\0
'
)
nl
=
len
(
n
)
nl
=
len
(
n
)
if
64
<
nl
:
flags
=
n
[
-
1
:]
# modern hash, full width
if
flags
in
_manifestflags
:
yield
f
,
bin
(
n
[:
64
]),
n
[
64
:]
n
=
n
[:
-
1
]
elif
40
<
nl
<
45
:
nl
-=
1
# legacy hash, always sha1
yield
f
,
bin
(
n
[:
40
]),
n
[
40
:]
else
:
else
:
...
@@ -67,5 +65,9 @@
...
@@ -67,5 +65,9 @@
else
:
else
:
yield
f
,
bin
(
n
),
b
''
flags
=
b
''
if
nl
not
in
(
40
,
64
):
raise
ValueError
(
b
'Invalid manifest line'
)
yield
f
,
bin
(
n
),
flags
def
_text
(
it
):
def
_text
(
it
):
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment