Support diffing against last reverse-flow in darc vmr diff#5213
Merged
Conversation
Co-authored-by: premun <7013027+premun@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Support diffing against last reverse-flow in darc vmr diff
Support diffing against last reverse-flow in darc vmr diff
Aug 27, 2025
premun
reviewed
Aug 27, 2025
src/Microsoft.DotNet.Darc/Darc/Operations/VirtualMonoRepo/VmrDiffOperation.cs
Outdated
Show resolved
Hide resolved
src/Microsoft.DotNet.Darc/Darc/Operations/VirtualMonoRepo/VmrDiffOperation.cs
Outdated
Show resolved
Hide resolved
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR adds support for running darc vmr diff from product repositories by reading VMR information from eng/Version.Details.xml. Previously, the command only worked when executed from within a VMR directory.
Key changes:
- Extended
darc vmr diffto work from product repositories witheng/Version.Details.xml - Added parsing of the
<Source>element to determine VMR URI and SHA for comparison - Enhanced help text to document the new usage patterns and auto-detection behavior
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| VmrDiffOptions.cs | Updated help text to document new auto-detection behavior and usage patterns |
| VmrDiffOperation.cs | Added logic to detect product repos, parse Version.Details.xml, and execute diff against VMR |
src/Microsoft.DotNet.Darc/Darc/Operations/VirtualMonoRepo/VmrDiffOperation.cs
Show resolved
Hide resolved
dkurepa
approved these changes
Aug 27, 2025
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.
Implements support for diffing against the last backflow when
darc vmr diffis called from a product repository (not a VMR).The same way we added
darc vmr diffcalled from VMR and diffing based onsource-manifest.json, we can now call it from the repo and it will use the<Source>tag.What this changes
Previously,
darc vmr diffcould only be used from within a VMR directory when no repository arguments were provided. This PR adds support for calling it from a product repository that containseng/Version.Details.xml.When called from a product repository:
<Source>element fromeng/Version.Details.xmlExamples
Error handling
The command provides clear error messages for various scenarios:
Backward compatibility
Existing VMR behavior is unchanged - when called from a VMR directory, it continues to diff against all repositories in
source-manifest.jsonas before.Fixes #5212.
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.