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.
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.
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.
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.
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.
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.
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).
I always reverted unchanged files in my changelists. I can't remember any wrong consequences.
(Fortunately, now we switched to git.)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With