Context
The new rebase flow will require user interaction where the PR will open with a comment like this and ask user to resolve the conflicts manually in his local environment.
Goal
Implement the darc vmr resolve command which will drive the local conflict resolution.
The command will accept two arguments:
subscription - GUID ID
build - BAR build ID (optional)
The command should accept regular optional code flow arguments
- TMP dir
- VMR dir (should be taken from CWD for FF subs, see below)
- ...
The command will then:
- Expect to be called from the target directory of the subscription - it should validate this:
- The subscription is a codeflow subscription
- When the subscription is FF, it should expect the VMR - it should validate the presence of
source-manifest.json
- When the sub is BF, it should verify the target directory on the sub equals the mapping name in
V.D.xml
- The command will look up the latest applied build (from the tracked PRs API)
- Then the command will materialize the codeflow updates locally:
- Find through the active PR endpoint the name of the PR remote+branch and fetch it / check it out locally
- Call the codeflow logic with
keepConflicts: true and headBranchExisted: true so that code changes are staged locally with conflicts in place
- Update the codeflow metadata in the repo
- Update version files
- Prompt the user to resolve the conflicts and to push the branch back
- I guess darc should not wait interactively for user to resolve the conflicts nor do the pushing - let the darc exit and the user will deal with this
- I think it's possible to prepare the next commit message in git by writing into some
.git/ file - ideally it could prepare this commit message for the user so that when they are committing, they don't need to do this
Context
The new rebase flow will require user interaction where the PR will open with a comment like this and ask user to resolve the conflicts manually in his local environment.
Goal
Implement the
darc vmr resolvecommand which will drive the local conflict resolution.The command will accept two arguments:
subscription- GUID IDbuild- BAR build ID (optional)The command should accept regular optional code flow arguments
The command will then:
source-manifest.jsonV.D.xmlkeepConflicts: trueandheadBranchExisted: trueso that code changes are staged locally with conflicts in place.git/file - ideally it could prepare this commit message for the user so that when they are committing, they don't need to do this