Merge proposal form says "If ... then leave this field blank"

Bug #202420 reported by Matthew Paul Thomas
2
Affects Status Importance Assigned to Milestone
Launchpad itself
Triaged
Low
Unassigned

Bug Description

The form for proposing a branch for merging contains a "Dependent branch:" field, with the caption: "The branch that the source branch branched from. If this is the same as the target branch, then leave this field blank."

When a text (or numeric) field tries to give you instructions on a value that has a special meaning, that usually means a pair of radio buttons need to get involved.

Here, the first radio button would represent the branch that the source branch branched from, and the second would offer the text field for entering a different branch -- similar to how the target branch radio buttons work.

Tags: lp-code ui
Changed in launchpad-bazaar:
status: New → Confirmed
Revision history for this message
Jonathan Lange (jml) wrote :

I think I understand the bug, but I definitely don't understand the bug report.

Matthew, could you please attach a mockup? Even a bit of ASCII art would help, I think.

Changed in launchpad-bazaar:
assignee: nobody → mpt
importance: Undecided → Low
status: Confirmed → Triaged
Revision history for this message
Matthew Paul Thomas (mpt) wrote :

A mundane refactoring would be:

    This branch is dependent on:
    (*) the branch I'm proposing it be merged into (<branch ID updated using JavaScript>)
    ( ) Another branch: [________________________]

However, It's not clear to me why you need to specify the dependent branch at all. Doesn't Launchpad know that already? And even if it doesn't, what relevance does it have to a merge proposal? I'm asking this not out of a wish to see this section of the form gone, but to understand what its labels should be.

Changed in launchpad-bazaar:
assignee: mpt → nobody
Revision history for this message
Jonathan Lange (jml) wrote :

Here's the canonical use case:

Jono is working on Feature X (codename "Infinite Jest"), a really big feature that requires significant refactoring of the project codebase. To make life easier for his reviewer, Jono has made a branch called 'feature-x-refactor' that does the refactoring, and another branch called 'feature-x-itself' that adds the feature and depends on feature-x-refactor.

Jono submits a proposal to merge feature-x-refactor and then submits another proposal to merge feature-x-itself, which depends on feature-x-refactor landing first.

In a future release of Launchpad, the merge proposal page will display diffs. When this happens, the feature-x-refactor merge page will show the diff you get when you merge feature-x-refactor into trunk, and the feature-x-itself page will show the diff you get when you first merge *feature-x-refactor* into trunk, commit, then merge feature-x-itself.

This means that reviewers of feature-x-itself can concern themselves with the changes in that branch, rather than the changes in the refactoring branch.

Revision history for this message
Matthew Paul Thomas (mpt) wrote :

Ok, so the answer to "what relevance does it have" is that Launchpad can calculate the diff. Thanks. But that makes me more curious about my other question: In what situations will Launchpad be able to calculate the diff, but *not* be able to work out for itself that the feature-x-itself branch is dependent on the feature-x-refactor branch?

Revision history for this message
Jonathan Lange (jml) wrote :

Launchpad can always guess, but it can never know for sure.

Here's one way to guess. We can check to see if any of the revisions that are in feature-x-refactor but not in trunk are parents of revisions in feature-x-itself. (The clunkiness of that sentence is some measure of the clunkiness of the guesswork.) The problem with this way of guessing is that sometimes multiple branches will fit the bill.

Revision history for this message
Matthew Paul Thomas (mpt) wrote :

Okay, so something like:

    <source branch name> is:
    (*) A direct branch of <target name synced using JS, defaulting to "the target branch">
    ( ) Dependent on another branch: [________________________]
        Launchpad will calculate the diff based on the dependent branch. <-- formHelp

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.