Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is a Perforce "shelved" file?

In Perforce, what is a "shelved" file? What is the purpose of shelving a file that is open for edit in the workspace?

like image 873
Derek Mahar Avatar asked Jun 02 '10 14:06

Derek Mahar


People also ask

What is a shelved changelist?

The Helix Server shelving feature enables you to temporarily make copies of your files available to other users without checking the changelist into the depot.

How do you submit a shelved changelist?

To submit shelved files in a pending changelist, right-click the changelist or shelved files folder and select Submit Shelved Files.

How do I delete a shelved changelist?

Unshelve changes Unshelved changes can be filtered out from view or removed from the shelf. In the Shelf tab, select the changelist or the files you want to unshelve. Press Ctrl+Shift+U or choose Unshelve from the context menu of the selection.

How do I update my p4 shelve?

You need to re-open d. txt and give it that change number using p4 reopen -c <change#> d. txt . Then run p4 shelve -r to update the shelved files.


1 Answers

From the Perforce documentation:

Shelving is the process of temporarily storing work in progress on a Perforce Server without submitting a changelist. Shelving is useful when you need to perform multiple development tasks (such as interruptions from higher-priority work, testing across multiple platforms) on the same set of files, or share files for code review before committing your work to the depot.

The p4 shelve command creates, modifies, or discards shelved files in a pending changelist. Shelved files persist in the depot until they are discarded (by means of p4 shelve -d) or replaced by subsequent p4 shelve commands.

After shelving files, you can revert or modify them in your client workspace, and restore the shelved versions of those files to your workspace with the p4 unshelve command. While files are shelved, other users can unshelve the shelved files into their own workspaces, or into other client workspaces.

Files that have been shelved can also be accessed with the p4 diff, p4 diff2, p4 files, and p4 print commands, using the revision specifier @=change, where change is the pending changelist number.

If no arguments are specified, p4 shelve creates a new changelist, adds files from the user's default changelist, and (after the user completes a form similar to that used by p4 submit), shelves the specified files into the depot. If a file pattern is given, p4 shelve shelves only the files that match the pattern.

like image 68
SLaks Avatar answered Oct 08 '22 16:10

SLaks