repo sync fails because of UTF-8

RESOLVED FIXED

Status

Firefox OS
GonkIntegration
RESOLVED FIXED
5 years ago
4 years ago

People

(Reporter: hub, Unassigned)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Reporter)

Description

5 years ago
This morning I did a |./repo sync|

It failed with:

Fetching projects: 100% (95/95), done.  
Syncing work tree:  71% (68/95)  Traceback (most recent call last):
  File "/home/hub/source/mozilla/B2G-inari/.repo/repo/main.py", line 418, in <module>
    _Main(sys.argv[1:])
  File "/home/hub/source/mozilla/B2G-inari/.repo/repo/main.py", line 394, in _Main
    result = repo._Run(argv) or 0
  File "/home/hub/source/mozilla/B2G-inari/.repo/repo/main.py", line 142, in _Run
    result = cmd.Execute(copts, cargs)
  File "/home/hub/source/mozilla/B2G-inari/.repo/repo/subcmds/sync.py", line 654, in Execute
    project.Sync_LocalHalf(syncbuf)
  File "/home/hub/source/mozilla/B2G-inari/.repo/repo/project.py", line 1169, in Sync_LocalHalf
    if committer_email == self.UserEmail:
  File "/home/hub/source/mozilla/B2G-inari/.repo/repo/project.py", line 629, in UserEmail
    self._LoadUserIdentity()
  File "/home/hub/source/mozilla/B2G-inari/.repo/repo/project.py", line 633, in _LoadUserIdentity
    u = self.bare_git.var('GIT_COMMITTER_IDENT')
  File "/home/hub/source/mozilla/B2G-inari/.repo/repo/project.py", line 2272, in runner
    r = r.decode()
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 12: ordinal not in range(128)


Just FYI.

$ cat ~/.gitconfig 
[user]
	name = Hubert Figuière
	email = hub@figuiere.net
	signingkey = A56E15A3
[color]
	ui = auto
[push]
	default = simple

$ hexdump -C ~/.gitconfig 
00000000  5b 75 73 65 72 5d 0a 09  6e 61 6d 65 20 3d 20 48  |[user]..name = H|
00000010  75 62 65 72 74 20 46 69  67 75 69 c3 a8 72 65 0a  |ubert Figui..re.|
00000020  09 65 6d 61 69 6c 20 3d  20 68 75 62 40 66 69 67  |.email = hub@fig|
00000030  75 69 65 72 65 2e 6e 65  74 0a 09 73 69 67 6e 69  |uiere.net..signi|
00000040  6e 67 6b 65 79 20 3d 20  41 35 36 45 31 35 41 33  |ngkey = A56E15A3|
00000050  0a 5b 63 6f 6c 6f 72 5d  0a 09 75 69 20 3d 20 61  |.[color]..ui = a|
00000060  75 74 6f 0a 5b 70 75 73  68 5d 0a 09 64 65 66 61  |uto.[push]..defa|
00000070  75 6c 74 20 3d 20 73 69  6d 70 6c 65 0a           |ult = simple.|
0000007d

Yes, 0xc3 is the first UTF-8 byted for the è found in my last name.

1995 called and want their ASCII only code back.
(Reporter)

Comment 1

5 years ago
Created attachment 809972 [details] [diff] [review]
Workaround

This work around in my case. But I'm sure if the users locale isn't utf-8 it might not work.
(Reporter)

Comment 2

5 years ago
This is a regression from repo caused by changeset 217ea7d2
(Reporter)

Comment 3

4 years ago
Fix by upstream e76efdd7b342577c40aa271fa5ded9d66a783a9b
Status: NEW → RESOLVED
Last Resolved: 4 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.