mirror of
https://github.com/facebook/sapling.git
synced 2024-10-10 08:47:12 +03:00
merge the fix for the encoding field bug
This commit is contained in:
commit
5459a96f50
@ -609,8 +609,7 @@ class Commit(ShaFile):
|
||||
"%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
|
||||
|
@ -359,7 +359,7 @@ class Repo(object):
|
||||
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)
|
||||
|
@ -17,7 +17,7 @@ importing Git objects into Hg
|
||||
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 @@ updating working directory
|
||||
| extra: branch=default
|
||||
| extra: committer=test <test@example.org> 1167609613 0
|
||||
| extra: encoding=latin-1
|
||||
| extra: message=\nadd d\xe9lt\xe0\n
|
||||
| extra: message=add d\xe9lt\xe0\n
|
||||
| description:
|
||||
| add déltà
|
||||
|
|
||||
|
Loading…
Reference in New Issue
Block a user