Perforce Public Knowledge Base - Submit Files from a Shelf
× PRODUCTS SOLUTIONS CUSTOMERS LEARN SUPPORT
Downloads Company Partners Careers Contact Free Trials
Menu Search
Perforce
Reset Search
 

 

Article

Submit Files from a Shelf

« Go Back

Information

 
Problem
I have a shelved file that I want to submit. Do I have to unshelve it first?
Solution

Summary

The 2013.1 release simplifies the file submit process by allowing shelved changes to be submitted without requiring that they be unshelved first. Prior to the 2013.1 release, shelved files had to be unshelved before they could be submitted to the depot.

p4 submit syntax:

p4 submit -e changelist

Details

If the submit is successful, the files are removed from the shelf and the changelist is shown as 'submitted' (prior to the successful p4 submit, the changelist would have been shown as 'pending'.)

There are six conditions which can cause the submit to fail:

  1. The shelved files must be at the head revision. Out-of-date files cannot be submitted without unshelving.
  2. The shelved files must not have pending resolves. Unresolved files cannot be submitted without unshelving.
  3. The owner of the changelist must be the current user.
  4. The changelist must not contain non-shelved files. Non-shelved files must be reverted or reopened in a different changelist before the shelf can be submitted.
  5. If the current client is a stream client, the files on the shelf must be submittable in this stream.
  6. (2013.1 only) The shelved file is from a Task Streams workspace. The "submit files from shelf" functionality does not support Task Streams in this version of the server.
 

Examples: Successful and Failed Submits

Success:
 
$ p4 submit -e 6
Submitting change 6.
Locking 1 files ...
edit //depot/proj-dev/file.c#3
Change 6 renamed change 10 and submitted.


Failure 1:

$ p4 submit -e 6
Submitting change 6.
//depot/proj-dev/file.c - must resolve before submitting
Out of date files must be resolved or reverted.
Submit failed -- fix problems above then use 'p4 submit -e 6'.


Failure 2:

$ p4 submit -e 7
Submitting change 7.
//ws-mac/rel1-proj/file.h - must resolve //toped/relwork/file.h#2
Merges still pending -- use 'resolve' to merge files.
Submit failed -- fix problems above then use 'p4 submit -e 7'.


Failure 3:

$ p4 submit -e 11
Change 11 belongs to user babar.

Failure 4:
$ p4 submit -e 12
Submitting change 12.
No files to submit.
Cannot submit - files are open by client ws-mac at change 12.


Failure 5:

$ p4 -c streamclient submit -e 15
Submitting change 15.
... //toped/relwork/file.h - warning: cannot submit from stream //toped/stream client
No files to submit.
Submit failed -- fix problems above then use 'p4 submit -e 15'.
or
$ p4 -c streamclient submit -e 15
Submitting change 15.
... //toped/relwork/file.h - warning: file not mapped in stream //toped/stream client
No files to submit.
Submit failed -- fix problems above then use 'p4 submit -e 15'.

Failure 6:
$ p4 submit -e 15
Client relwork is a task stream client --  cannot submit shelved change.
Related Links

Feedback

 

Was this article helpful?


   

Feedback

Please tell us how we can make this article more useful.

Characters Remaining: 255