Closed Bug 748428 Opened 12 years ago Closed 12 years ago

Non-existent branches need to be properly handled

Categories

(Release Engineering :: General, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: mjessome, Assigned: mjessome)

Details

Attachments

(1 file, 1 obsolete file)

Attached patch Fix branch handling v1 (obsolete) — Splinter Review
When autoland is flagged for a branch that does not exist, the permissions API (which checks permissions on hg repos) will return None. We want to use this as an indication that it is an invalid branch, and fail out with an appropriate comment back to the user.

This also takes care of some small mistakes that were made with "branch" variable usage.
Attachment #617927 - Flags: review?(rail)
Comment on attachment 617927 [details] [diff] [review]
Fix branch handling v1

Waiting for v2...
Attachment #617927 - Flags: review?(rail)
Version 2, using an Exception rather than a common return value.
Attachment #617927 - Attachment is obsolete: true
Attachment #617958 - Flags: review?(rail)
Comment on attachment 617958 [details] [diff] [review]
Fix branch handling v2

Review of attachment 617958 [details] [diff] [review]:
-----------------------------------------------------------------

::: autoland_queue.py
@@ +690,5 @@
> +    try:
> +        branch_perms = ldap.get_branch_permissions(branch.name)
> +    except ldap_utils.BranchDoesNotExist:
> +        post_comment("Autoland Failure:\n"
> +                     "Cannot land to branch %s."

A nit: add \n here.
Attachment #617958 - Flags: review?(rail) → review+
Attachment #617958 - Flags: checked-in+
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Whiteboard: [autoland]
Product: mozilla.org → Release Engineering
Component: Tools → General
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: