Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Should I submit unchanged files to Perforce?

I'm using Perforce to integrate two codelines. In the resulting changelist, there are files which are marked as opened for integration, but have not actually changed.

Should I submit these unchanged files or should I revert them?

I want to revert them because I don't want these unchanged files to pollute the changelist.

But, if I submit them, I have a feeling that Perforce might have a use of this "fact" (that the files have been integrated) for future integration.

like image 551
Eddy Mulyono Avatar asked Jan 26 '11 02:01

Eddy Mulyono


People also ask

What does Perforce submit do?

Before committing a changelist, p4 submit briefly locks all files being submitted. If any file cannot be locked or submitted, the files are left open in a numbered pending changelist. By default, the files in a failed submit operation are left locked unless the submit.

What does p4 change do?

p4 change brings up a form for editing or viewing in the editor defined by the environment variable P4EDITOR . When no arguments are provided, this command creates a numbered changelist. All files open in the default changelist are moved to the numbered changelist.

How do I undo a p4 revert?

The p4 undo command opens files to undo a set of previously submitted changes. The undone changes remain a part of the file history, but the new revisions submitted after p4 undo reverse their effect. If a single revision is specified, the specified revision is undone.

What is rollback in Perforce?

When you rollback a file or folder, Perforce copies the chosen revision to your workspace and adds the change information to a pending changelist. When you submit the changelist, Perforce persists the chosen revision to the depot as the head revision.


3 Answers

There is no need to submit unchanged files. I can't even understand why the option exists. Perforce only needs to know about changes you make to files. The fact that you checked a file out, but did nothing to it, is irrelevant. Revert unchanged files. As you said, don't pollute the revision history.

like image 155
raven Avatar answered Nov 06 '22 20:11

raven


Yes, you should submit them. This will create the integration record to record that the changes have been "integrated" (which may not mean actual changes occurred on the target).

like image 38
JasonMArcher Avatar answered Nov 06 '22 22:11

JasonMArcher


I always reverted unchanged files in my changelists. I can't remember any wrong consequences.

(Fortunately, now we switched to git.)

like image 2
9000 Avatar answered Nov 06 '22 21:11

9000