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
626d7c01
Commit
626d7c01
authored
15 years ago
by
Abderrahim Kitouni
Browse files
Options
Downloads
Patches
Plain Diff
fix the encoding bug correctly
parent
a3914d6a
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
dulwich/objects.py
+1
-2
1 addition, 2 deletions
dulwich/objects.py
dulwich/repo.py
+1
-1
1 addition, 1 deletion
dulwich/repo.py
tests/test-encoding.out
+2
-2
2 additions, 2 deletions
tests/test-encoding.out
with
4 additions
and
5 deletions
dulwich/objects.py
+
1
−
2
View file @
626d7c01
...
...
@@ -609,8 +609,7 @@
"
%s must be followed by space not %s
"
%
(
ENCODING_ID
,
text
[
count
])
count
+=
1
self
.
_encoding
=
text
[
count
:].
split
(
"
\n
"
,
1
)[
0
]
while
text
[
count
]
!=
"
\n
"
:
count
+=
1
count
+=
len
(
self
.
_encoding
)
+
1
count
+=
1
self
.
_message
=
text
[
count
:]
self
.
_needs_parsing
=
False
...
...
This diff is collapsed.
Click to expand it.
dulwich/repo.py
+
1
−
1
View file @
626d7c01
...
...
@@ -359,7 +359,7 @@
commit_data
+=
'
author
'
+
commit
[
'
author
'
]
+
"
\n
"
commit_data
+=
'
committer
'
+
commit
[
'
committer
'
]
+
"
\n
"
if
'
encoding
'
in
commit
:
commit_data
+=
'
encoding
'
+
commit
[
'
encoding
'
]
commit_data
+=
'
encoding
'
+
commit
[
'
encoding
'
]
+
"
\n
"
commit_data
+=
"
\n
"
commit_data
+=
commit
[
'
message
'
]
sha
=
self
.
write_object
(
'
commit
'
,
commit_data
)
...
...
This diff is collapsed.
Click to expand it.
tests/test-encoding.out
+
2
−
2
View file @
626d7c01
...
...
@@ -17,7 +17,7 @@
at: 0/4
updating working directory
4 files updated, 0 files merged, 0 files removed, 0 files unresolved
@ changeset: 3:
4194aac3187933e5859d85d8f572234e41f79f3d
@ changeset: 3:
983a70eb26960008c2d503306d2c2b047e1b2c0c
| tag: master
| tag: default/master
| tag: tip
...
...
@@ -31,7 +31,7 @@
| extra: branch=default
| extra: committer=test <test@example.org> 1167609613 0
| extra: encoding=latin-1
| extra: message=
\n
add d\xe9lt\xe0\n
| extra: message=add d\xe9lt\xe0\n
| description:
| add déltà
|
...
...
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