fix(p4): fix output parsing bugs and add VCS adapter tests#38
Merged
dlyongemallo merged 1 commit intomainfrom Mar 12, 2026
Merged
fix(p4): fix output parsing bugs and add VCS adapter tests#38dlyongemallo merged 1 commit intomainfrom
dlyongemallo merged 1 commit intomainfrom
Conversation
There was a problem hiding this comment.
Pull request overview
This PR improves Diffview’s Perforce adapter output parsing (opened/diff/diff2/describe) and adds functional coverage for Perforce, Jujutsu, and Mercurial adapters, with CI updates to install required CLIs.
Changes:
- Fix Perforce
p4 opened,p4 diff -sl, andp4 diff2 -dsparsing to avoid revision-suffix issues and better detect adds/deletes/modifies. - Adjust
p4 describeparsing to correctly handle blank lines in the “Affected files …” section. - Add/extend functional tests for p4/jj/hg adapters and update CI + README to reflect tool requirements.
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| lua/diffview/vcs/adapters/p4/init.lua | Updates Perforce tracked-files parsing for opened, diff -sl, and diff2 -ds. |
| lua/diffview/vcs/adapters/p4/commit.lua | Refines p4 describe parsing termination logic to handle blank lines. |
| lua/diffview/tests/functional/p4_adapter_spec.lua | Adds Perforce adapter functional + parsing tests using a disposable p4d repo. |
| lua/diffview/tests/functional/jj_adapter_spec.lua | Adds Jujutsu integration tests for tracked files/show behavior. |
| lua/diffview/tests/functional/hg_adapter_spec.lua | Adds Mercurial functional tests for tracked files/show behavior. |
| README.md | Documents minimum Perforce CLI version and environment prerequisites. |
| .github/workflows/ci.yml | Downloads/caches p4/p4d and jj so integration tests can run in CI. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
fcc07c0 to
dcb4918
Compare
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.
No description provided.