2

I created swarm review, then decided to revert some changes, so deleted files from corresponding CL. But files are still in swarm. There are two types of such files:

  1. Files existed before i made my changes and i reverted it.
  2. Files created during my changes and i deleted it.

How can i remove these both types from swarm review?

EDIT:

As i wasn't able able to remove file from swarm, i added this file reverted again to the CL and after this in swarm i have

enter image description here

And then i removed the file from the CL. And it continued to be in swarm.

Yola
  • 18,496
  • 11
  • 65
  • 106

2 Answers2

2

You need to get the files right in your pending changelist's shelf. Presumably using P4V or p4 or whatever client you are using. Once the shelf (as well as the pending changelist) only contain the files it/they should, update the review.

sferencik
  • 3,144
  • 1
  • 24
  • 36
  • the thing is that it doesn't contain these files any more, because i either reverted them or deleted them. But there are still in corresponding swarm review. – Yola Sep 07 '17 at 14:54
  • Doesn't the review get updated automatically when i shelve/unshelve files? – Yola Sep 08 '17 at 07:30
  • It does, when you shelve (not when you unshelve). However, when you shelve files `foo` and `bar`, and your shelf already contains `foo`, `bar`, and `baz`, the two files (`foo`, `bar`) will be updated in the shelf but `baz` won't be removed from the shelf. Thus, the review will still contain `baz` as well. – sferencik Sep 12 '17 at 08:27
  • 2
    use -r to remove baz also(if you have reverted baz). – Codename_DJ Feb 14 '18 at 12:48
1

First get you files right in the Changelist, using p4 revert. Then while you are shelving them again, use -r. It will replace the existing shelf with the current shelf completely. Normally it would do file by file, thus causing the issue for deleted files. Swarm will show the updated shelf after this.

p4 shelve -r -c 123456
Codename_DJ
  • 553
  • 1
  • 11
  • 40