daveg
daveg

Reputation: 1211

In perforce, how can I reopen all elements of a CL into the default CL ?

Server version: P4D/LINUX26X86_64/2013.2/938876 (2014/09/23)

Hi:

Let's say I have a pending changelist 123 which has these 2 files...

... //foo/somewhere/abc.txt#100 edit
... //foo/somewherelse/def/txt#67 edit

I want to put both of these in the default CL. I know I can

"p4 reopen -c default //foo/somewhere/abc.txt" 

and then

"p4" reopen -c default //foo/somewherelse/def.txt"

But is there a way to specify all the files in CL 123 regardless of the paths (do both reopens with one command)?

My actual situation involves a shelvelist. I want to put the changes in a shelvelist back in the default CL then delete the shelvelist AND the changelist that results after one deletes a shelve. Basically I want to undo the shelve operation. My method of doing this is...

1) delete the shelve
2) p4 describe the changelist
3) p4 reopen -c default each file, one at a time
4) delete the empty changelist

If there's a shortcut to do that, I'm all ears (eyes, whatever) !

But I would still like to learn how to do what I originally asked.

BTW, I do NOT have admin privs :-}

Thanks !

Upvotes: 0

Views: 1651

Answers (1)

Samwise
Samwise

Reputation: 71574

For the specific case of undoing a shelve operation and putting the shelf's contents back into the default changelist you could use p4 revert followed by p4 unshelve.

For the general case, if you just want to reopen everything in the default changelist you could do:

p4 reopen -c default //...

If you have a bunch of changelists and you want to just move the files from change 123 into the default changelist that'd be more like:

p4 -F %depotFile% opened -c 123 | p4 -x - reopen -c default

Upvotes: 3

Related Questions