Closed Bug 1187939 Opened 9 years ago Closed 9 years ago

bzexport fails on bugs with no description

Categories

(Developer Services :: Mercurial: bzexport, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: gcp, Assigned: gps)

Details

Attachments

(1 file)

For a patch where the description reads like:

Bug xxxxxx. r=somebody

bzexport fails in:

  File "/home/morbo/.mozbuild/version-control-tools/hgext/bzexport/__init__.py", line 873, in bzexport
    if desc[-1] in [';', '.']:

It's fairly typical for security bugs not to have a description outside (nonpublic) Bugzilla.
bzexport: guard against empty description (bug 1187939); r?smacleod

Apparently the description can be empty for e.g. security bugs. I didn't
write a test because I'm not sure the exact steps to reproduce. I'm not
sure a test is warranted for a simple bounds check anyway.
Attachment #8639395 - Flags: review?(smacleod)
Attachment #8639395 - Flags: review?(smacleod) → review+
Comment on attachment 8639395 [details]
MozReview Request: bzexport: guard against empty description (bug 1187939); r?smacleod

https://reviewboard.mozilla.org/r/14197/#review12801

Ship It!
url:        https://hg.mozilla.org/hgcustom/version-control-tools/rev/b21a891ca0076ced7aab75a0e43d1b927f369700
changeset:  b21a891ca0076ced7aab75a0e43d1b927f369700
user:       Gregory Szorc <gps@mozilla.com>
date:       Mon Jul 27 14:10:49 2015 -0700
description:
bzexport: guard against empty description (bug 1187939); r=smacleod

Apparently the description can be empty for e.g. security bugs. I didn't
write a test because I'm not sure the exact steps to reproduce. I'm not
sure a test is warranted for a simple bounds check anyway.
Landed. Thanks for reporting.
Assignee: nobody → gps
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
FWIW I encountered this when trying to do a bzexport -e with a hg patch with a description of 

Bug 1234567. r=somebody

Which I think should reproduce it easily / allow writing a testcase.
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: