Skip to content

fix(p4): fix output parsing bugs and add VCS adapter tests#38

Merged
dlyongemallo merged 1 commit intomainfrom
fix_vcs_adapter_bugs
Mar 12, 2026
Merged

fix(p4): fix output parsing bugs and add VCS adapter tests#38
dlyongemallo merged 1 commit intomainfrom
fix_vcs_adapter_bugs

Conversation

@dlyongemallo
Copy link
Copy Markdown
Owner

No description provided.

Copilot AI review requested due to automatic review settings March 11, 2026 15:41
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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, and p4 diff2 -ds parsing to avoid revision-suffix issues and better detect adds/deletes/modifies.
  • Adjust p4 describe parsing 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.

Comment thread lua/diffview/vcs/adapters/p4/init.lua
Comment thread lua/diffview/tests/functional/p4_adapter_spec.lua
@dlyongemallo dlyongemallo force-pushed the fix_vcs_adapter_bugs branch from fcc07c0 to dcb4918 Compare March 12, 2026 09:40
@dlyongemallo dlyongemallo merged commit 0ab16a1 into main Mar 12, 2026
2 checks passed
@dlyongemallo dlyongemallo deleted the fix_vcs_adapter_bugs branch March 12, 2026 09:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants