Closed Bug 1144629 Opened 9 years ago Closed 9 years ago

UnicodeDecodeError in ./mach mercurial-setup

Categories

(Developer Services :: Mercurial: hg.mozilla.org, defect)

All
Linux
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: stephanichous, Assigned: stephanichous)

Details

(Whiteboard: [lang=python])

Attachments

(1 file, 2 obsolete files)

Attached patch patch.diff (obsolete) — Splinter Review
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!
Mentor: mh+mozilla
Keywords: checkin-needed
Whiteboard: [lang=python]
Attachment #8579317 - Flags: review?(mh+mozilla)
Attachment #8579317 - Flags: review?(gps)
Attachment #8579317 - Flags: review?(gps) → review?
Attachment #8579317 - Flags: review?
Mentor: mh+mozilla
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
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-
Attached patch patch.diff (obsolete) — Splinter Review
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)
Attachment #8579975 - Flags: review?(mh+mozilla) → review+
Attached patch patch.diffSplinter Review
Commit for the checking-needed
Attachment #8579975 - Attachment is obsolete: true
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
Closed: 9 years ago
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.

Attachment

General

Created:
Updated:
Size: