Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: TCR revert operation with p4 sync is not working #255

Closed
1 task done
mengdaming opened this issue Feb 13, 2023 · 0 comments
Closed
1 task done

[Bug]: TCR revert operation with p4 sync is not working #255

mengdaming opened this issue Feb 13, 2023 · 0 comments
Assignees
Labels
bug Something isn't working murex Items related to using TCR at Murex perforce Perforce related issues S Small

Comments

@mengdaming
Copy link
Contributor

Contact Details

damien.menanteau@gmail.com

Describe the bug

Running TCR revert operation with the following operation does not work:

p4 sync -f <file-path>

To Reproduce

Steps to reproduce the behavior:

  1. Open a git bash terminal
  2. run p4 set P4CLIENT=<client_name>
  3. Start TCR with option -V p4 and enter the driver role
  4. Modify one of the watched source files so that it breaks at least one test, and save it in order to trigger TCR loop
  5. TCR says it's reverting the source file
  6. When looking at the source file's contents, the change is not reverted as it should have been

Expected behavior

Once TCR's revert operation is completed, the modified source file should be reverted to the latest submitted p4 revision.

Working Environment

  1. OS: Windows
  2. p4 client
  3. TCR version 0.24.4

Additional Context

After investigation, it appears that the p4 implementation for vcs.Restore(path) should call the 2 following p4 commands in sequence in order to work as expected:

p4 reconcile  -a -e -d <file-path> (in order to tell p4 to open the file for edition)
p4 revert <file-path>

Code of Conduct

  • I agree to follow this project's Code of Conduct
@mengdaming mengdaming added the bug Something isn't working label Feb 13, 2023
@mengdaming mengdaming self-assigned this Feb 13, 2023
@mengdaming mengdaming added the S Small label Feb 13, 2023
@mengdaming mengdaming added perforce Perforce related issues murex Items related to using TCR at Murex labels Feb 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working murex Items related to using TCR at Murex perforce Perforce related issues S Small
Development

When branches are created from issues, their pull requests are automatically linked.

1 participant