Skip to content

vmr cherry-pick has poor UX when non-VMR branch of source repo is checked out #6016

@mmitche

Description

@mmitche

It looks like the cherry-pick command attempts to derive the repo mapping from the HEAD of the source repository. Let's say I had runtime's release/8.0 branch checked out. In this case, I get a cryptic error:

Cherry-pick operation failed: No mapping information found in Version.Details.xml Source section

This has two issues:

  • It doesn't work
  • The error doesn't make it clear what to do.

In this case, what appears to be going on is that the command is attempting to determine the VMR mapping from the source repo at HEAD. But since release/8.0 is checked out, it can't, and so it fails. It could use the mapping at the cherry-pick SHA instead. This might not be ideal in all cases (e.g. inter-version cherry-picks), so perhaps it should employ the following logic.

  • Check at HEAD. If mapping, use that.
  • Check at cherry-pick sha. If mapping available, use that.

If no mapping is found, the message needs to be more helpful. Most likely the user hasn't fetched the source commit, or has the wrong branch checked out, or is running from the wrong directory. The message should hint at proper usage.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions