Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
mercurial-devel
Manage
Activity
Members
Labels
Plan
Wiki
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
Environments
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
mercurial-devel
Commits
bf69cb09a6c9
Commit
bf69cb09a6c9
authored
10 years ago
by
durin42
Browse files
Options
Downloads
Patches
Plain Diff
manifest: move manifestdict-to-text encoding to manifest class
A future patch will introduce a new format, with a new class.
parent
5e5d297ccbd0
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
mercurial/manifest.py
+9
-8
9 additions, 8 deletions
mercurial/manifest.py
with
9 additions
and
8 deletions
mercurial/manifest.py
+
9
−
8
View file @
bf69cb09
...
...
@@ -40,6 +40,14 @@
def
flagsdiff
(
self
,
d2
):
return
dicthelpers
.
diff
(
self
.
_flags
,
d2
.
_flags
,
""
)
def
text
(
self
):
fl
=
sorted
(
self
)
_checkforbidden
(
fl
)
hex
,
flags
=
revlog
.
hex
,
self
.
flags
# if this is changed to support newlines in filenames,
# be sure to check the templates/ dir again (especially *-raw.tmpl)
return
''
.
join
(
"
%s
\0
%s%s
\n
"
%
(
f
,
hex
(
self
[
f
]),
flags
(
f
))
for
f
in
fl
)
def
_checkforbidden
(
l
):
"""
Check filenames for illegal characters.
"""
...
...
@@ -220,14 +228,7 @@
# just encode a fulltext of the manifest and pass that
# through to the revlog layer, and let it handle the delta
# process.
files
=
sorted
(
map
)
_checkforbidden
(
files
)
# if this is changed to support newlines in filenames,
# be sure to check the templates/ dir again (especially *-raw.tmpl)
hex
,
flags
=
revlog
.
hex
,
map
.
flags
text
=
''
.
join
(
"
%s
\0
%s%s
\n
"
%
(
f
,
hex
(
map
[
f
]),
flags
(
f
))
for
f
in
files
)
text
=
map
.
text
()
arraytext
=
array
.
array
(
'
c
'
,
text
)
cachedelta
=
None
...
...
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