views:

242

answers:

2

(I've already asked this on SU; while I appreciate the Tumbleweed badge there, I'd prefer an answer...)

I have a reverse integration pending that I'd like to perform again on the files that are checked out for the integration. The use case is when I've made a change in the integration source and I'd like to propagate it to the integration destination again, but I don't want to perform an integration on the whole branchspec - just the files that I already have open for integration. Is there an automatic way to accomplish this?

Update:

I'm using the command-line tool, not p4v or another GUI. Also, please consider the possibility that I may have other files open as well, e.g., the set of files in p4 opened may be a superset of the changelist I am interested in.

+4  A: 

Perforce is notorious for not providing complete tools just things you can pipe and process. You might try doing something like

for file in `p4 opened` do
  p4 integ $file $somedestination/$file
done
stimms
+1  A: 

Do you mean you want to revert your existing integrations and re-do them to include recently submitted changes? If so, something like this may work:

p4 opened | sed -e 's:#.*::' > filespecs
xargs < filespecs | p4 revert
xargs < filespecs | p4 integrate -b branch

The first command is harmless, but the other two are destructive, so test by adding "echo" before the p4 commands to make sure the commands p4 commands that are generated look right to you. eg:

xargs < filespecs | echo p4 revert
xargs < filespecs | echo p4 integrate -b branch
Laurence Gonsalves