If you think a bug might affect users in the 57 release, please set the correct tracking and status flags for Release Management.

UnicodeDecodeError in ./mach mercurial-setup

RESOLVED FIXED

Status

Developer Services
Mercurial: hg.mozilla.org
RESOLVED FIXED
3 years ago
3 years ago

People

(Reporter: Stéphane SCHMIDELY, Assigned: Stéphane SCHMIDELY)

Tracking

Details

(Whiteboard: [lang=python])

Attachments

(1 attachment, 2 obsolete attachments)

(Assignee)

Description

3 years ago
Created attachment 8579317 [details] [diff] [review]
patch.diff

User Agent: Mozilla/5.0 (X11; Ubuntu; Linux i686; rv:36.0) Gecko/20100101 Firefox/36.0
Build ID: 20150306140126

Steps to reproduce:

In mozilla-central repository:
> cd mozilla-central
> ./mach mercurial-setup


Actual results:

[...]
Would you like to activate the mq extension? [Y/n]
y
Activated mq extension.

Error running mach:

    ['mercurial-setup']

The error occurred in code that was called by the mach command. This is either
a bug in the called code itself or in the way that mach is calling it.

You should consider filing a bug for this issue.

If filing a bug, please include the full output of mach, including this error
message.

The details of the failure are as follows:

UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 15: ordinal not in range(128)

  File "/home/stephlm2dev/GitHub/mozilla-central/tools/mercurial/mach_commands.py", line 42, in mercurial_bootstrap
    result = wizard.run(map(os.path.expanduser, config_paths))
  File "/home/stephlm2dev/GitHub/mozilla-central/tools/mercurial/hgsetup/wizard.py", line 258, in run
    self.prompt_external_extension(c, 'bzexport', BZEXPORT_INFO)
  File "/home/stephlm2dev/GitHub/mozilla-central/tools/mercurial/hgsetup/wizard.py", line 401, in prompt_external_extension
    if not self.can_use_extension(c, name, path):
  File "/home/stephlm2dev/GitHub/mozilla-central/tools/mercurial/hgsetup/wizard.py", line 393, in can_use_extension
    return "Traceback" not in result


Expected results:

[...] all stuff

Wrote changes to /home/stephlm2dev/.hgrc.
Your Mercurial should now be properly configured and recommended extensions
should be up to date!
(Assignee)

Updated

3 years ago
Mentor: mh+mozilla@glandium.org
Keywords: checkin-needed
Whiteboard: [lang=python]
(Assignee)

Updated

3 years ago
Attachment #8579317 - Flags: review?(mh+mozilla)
Attachment #8579317 - Flags: review?(gps)
(Assignee)

Updated

3 years ago
Attachment #8579317 - Flags: review?(gps) → review?
(Assignee)

Updated

3 years ago
Attachment #8579317 - Flags: review?
(Assignee)

Updated

3 years ago
Mentor: mh+mozilla@glandium.org
(Assignee)

Updated

3 years ago
OS: All → Linux
checkin-needed is used to signify patches that are ready to land. Please avoid setting it until it's gone through review :)
Keywords: checkin-needed
(Assignee)

Comment 2

3 years ago
OK. I didn't know that. Thank you for removing it.
Comment on attachment 8579317 [details] [diff] [review]
patch.diff

I think this is almost certainly not the right thing to do. AIUI from comment 0, the problem is that "Traceback" in tools/mercurial/hgsetup/wizard.py is a unicode literal, and the result of subprocess.check_output is a str, so python does conversions... replacing "Traceback" with b"Traceback" should fix it.
Attachment #8579317 - Flags: review?(mh+mozilla)
Attachment #8579317 - Flags: review?(gps)
Attachment #8579317 - Flags: review-
(Assignee)

Comment 4

3 years ago
Created attachment 8579975 [details] [diff] [review]
patch.diff

OK. I thought it would fix others problems with the same type of error.

I made the fix you suggested and it worked.
Attachment #8579317 - Attachment is obsolete: true
Attachment #8579975 - Flags: review?(mh+mozilla)

Updated

3 years ago
Attachment #8579975 - Flags: review?(mh+mozilla) → review+
(Assignee)

Comment 5

3 years ago
Created attachment 8583029 [details] [diff] [review]
patch.diff

Commit for the checking-needed
Attachment #8579975 - Attachment is obsolete: true
(Assignee)

Updated

3 years ago
Keywords: checkin-needed
https://hg.mozilla.org/integration/fx-team/rev/b53d8a0d5645
Assignee: nobody → stephanichous
Keywords: checkin-needed
Whiteboard: [lang=python] → [lang=python][fixed-in-fx-team]
https://hg.mozilla.org/mozilla-central/rev/b53d8a0d5645
Status: UNCONFIRMED → RESOLVED
Last Resolved: 3 years ago
status-firefox39: --- → fixed
Resolution: --- → FIXED
Whiteboard: [lang=python][fixed-in-fx-team] → [lang=python]
You need to log in before you can comment on or make changes to this bug.