Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I split a large changelist in P4

Tags:

perforce

I have a very large changelist (~40,000 files) and I need to split it into several smaller changelists so I can view the files contained. I am aware that I can adjust my p4 preferences to show more files in a changelist, but I need to run commands against the files in the changelist, and when I run the command it hangs and doesn't complete after 18 hours.

I'm running the 2012.2 P4 server.

The command I'm running is:

C:>p4 -u some_user -c some_client revert -k -c 155530 //...

Thanks

like image 834
the_cat_lady Avatar asked Jan 20 '26 11:01

the_cat_lady


1 Answers

If you want to move files into a separate changeset, you could do:

p4 reopen -c default //some/subdirectory/...
p4 change

The above would move a portion of the files into the "default" changeset and then create a new changeset from them. Or, if you have another changeset to use already, you could of course do:

p4 reopen -c NEW_CLN //some/subdirectory/...

directly.

If the files you want to split out aren't nicely contained within a subdirectory, a more general approach would be to do:

p4 -ztag opened -c OLD_CLN | grep depotFile | cut -d ' ' -f 3 > files.txt

to get a list of files opened in that changeset. Then edit that file so that only files you want to remove from the changeset are listed, and then do:

p4 -x files.txt reopen -c NEW_CLN

The above calls p4 reopen -c NEW_CLN using each of line from files.txt as an argument.

like image 96
jamesdlin Avatar answered Jan 22 '26 07:01

jamesdlin