Fix darc vmr cherry-pick to honor --vmr and improve error messaging#6018
Draft
Fix darc vmr cherry-pick to honor --vmr and improve error messaging#6018
darc vmr cherry-pick to honor --vmr and improve error messaging#6018Conversation
…error messages - Use _options.VmrPath (from --vmr) to determine the VMR path, fixing the bug where --vmr was ignored - Fall back to checking --source as VMR for backward compatibility (running from repo with --source = VMR) - Show clear error when neither --vmr nor --source points to a VMR, with hint to use --vmr or run from VMR dir - Fix ApplyPatches to apply to vmrPath (not always current dir), enabling cherry-pick from any directory - Add error handling for FindGitRoot failures - Add directional log messages showing source and target with explicit paths Co-authored-by: mmitche <8725170+mmitche@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Fix cherry-pick error messaging for non-VMR directory
Fix Feb 26, 2026
darc vmr cherry-pick to honor --vmr and improve error messaging
Member
|
@mmitche what state is this in? Did you test it locally? Can we merge? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
darc vmr cherry-pickwas silently ignoring the--vmroption and always applying patches to the current directory's git root, making it impossible to cherry-pick without being physically inside the VMR directory.Root cause
CherryPickOperationusedEnvironment.CurrentDirectoryexclusively for VMR detection and patch application, never consulting_options.VmrPath. This caused two bugs:--vmr /path/to/vmrwas a no-op in the operation logicChanges
_options.VmrPath(from--vmr, defaults to current dir) forsource-manifest.jsonfirst. Fall back to checking--sourceas the VMR for backward compatibility (old pattern: run from repo,--source= VMR path).vmrPathwhen flowing repo→VMR, orrepoPathwhen flowing VMR→repo — instead of always targeting the current dir's git root.FindGitRootcalls in try/catch with actionable messages instead of letting exceptions bubble up cryptically.Original prompt
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.