azzurris / git-repo

Automatically exported from code.google.com/p/git-repo
Apache License 2.0
0 stars 0 forks source link

repo upload fails with non-ascii commit messages #95

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Affected Version: v1.7.7.5
Environment: GNU/Linux

What steps will reproduce the problem?

In a repo-enabled repository:

1. git touch foo
2. git add foo
3. git commit -m "Fixed a naïve assumption about ..."
4. repo upload .

What is the expected output? What do you see instead?

$EDITOR should start up with the available branches, but the following is 
printed instead:

Traceback (most recent call last):
  File "/opt/repo/main.py", line 355, in <module>
    _Main(sys.argv[1:])
  File "/opt/repo/main.py", line 337, in _Main
    repo._Run(argv)
  File "/opt/repo/main.py", line 135, in _Run
    cmd.Execute(copts, cargs)
  File "/opt/repo/subcmds/upload.py", line 373, in Execute
    self._MultipleBranches(opt, pending, people)
  File "/opt/repo/subcmds/upload.py", line 218, in _MultipleBranches
    script = Editor.EditString("\n".join(script)).split("\n")
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 29: 
ordinal not in range(128)

Please provide any additional information below.

Repo should use the utf-8 encoding for all data read from and written to git. 
For $EDITOR it should probably use the locale encoding.

Original issue reported on code.google.com by skyos...@chromium.org on 2 Nov 2011 at 4:01

GoogleCodeExporter commented 9 years ago
This is likely fixed via 605a9a, which is in current repo versions; kindly 
confirm...

Original comment by ferri...@google.com on 5 Jan 2012 at 12:13

GoogleCodeExporter commented 9 years ago
I tried this again with repo v1.7.8.1 and everything worked correctly. Thanks 
for the fix!

Original comment by skyos...@chromium.org on 5 Jan 2012 at 2:02

GoogleCodeExporter commented 9 years ago

Original comment by david.pu...@sonymobile.com on 17 May 2013 at 8:27