Skip to content

Perforce support#81

Draft
tiulpin wants to merge 3 commits intomainfrom
claude/explore-perforce-support-dbmeJ
Draft

Perforce support#81
tiulpin wants to merge 3 commits intomainfrom
claude/explore-perforce-support-dbmeJ

Conversation

@tiulpin
Copy link
Member

@tiulpin tiulpin commented Feb 7, 2026

Summary

Changes

Design Decisions

Example

tc <command>

Test Plan

  • Tests pass (go test ./...)
  • Linter passes (golangci-lint run)
  • Manually tested

Introduce a VCS provider abstraction layer and implement Perforce support
alongside the existing Git integration. This enables the CLI to work with
Perforce workspaces for branch detection, local changes, and personal builds.

Changes:
- VCS provider interface (VCSProvider) with Git and Perforce implementations
- Auto-detection of VCS type (Git repo vs Perforce workspace)
- VCS root CRUD API methods (create, read, list, delete, attach)
- Perforce-aware branch/revision formatting in build triggers and change display
- Support for `--local-changes p4` to upload Perforce pending changelists
- Integration tests with p4d container for VCS root operations
- Unit tests for all VCS providers and API methods

https://claude.ai/code/session_01Buy3ZEvVTWwhkQHU4H442q
- Consolidate 4 DetectVCS() calls in runRunStart into 1
- Unify loadLocalChanges through VCS provider (git/p4/auto all use same path)
- Remove VCSBranchFormatter closure from API struct (heuristic handles both VCS types)
- Add 10s timeout to all p4 subprocess calls via exec.CommandContext
- Extract p4Output/p4Run/p4ZtagField helpers to DRY up ztag parsing
- Remove dead code: getPerforcePort(), unused perforceTestEnv fields
- Replace time.Sleep with readiness polling in p4d integration test
- Fix populateP4Depot to propagate errors instead of swallowing
- Fix url parameter shadow in NewGitVcsRootProperties

https://claude.ai/code/session_01Buy3ZEvVTWwhkQHU4H442q
Remove AI-generated doc comments, unused p4Run function, and
compact single-line interface delegations for cleaner review.

https://claude.ai/code/session_01Buy3ZEvVTWwhkQHU4H442q
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