Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Perforce — move a shelved Changelist from main to branch?

Tags:

I wonder if there is any way to move a Changelist which was created editing on /main/ to a branch /dev/branch?

I have six such Changelists with a lot of files in them. I shelved all files and would like to move them to the branch to keep working there. I would prefer to do this directly in P4V, if possible.

I'm using P4V 2011.1 with the 2010.2 P4 server.

like image 560
Martin Schulze Avatar asked Feb 16 '12 17:02

Martin Schulze


People also ask

How do I move files from one changelist to another?

To move files from one changelist to another, issue the p4 reopen -c changenumfilenames command, where changenum specifies the number of the target changelist. If you are moving files to the default changelist, use p4 reopen -c default filenames .

How do I delete a shelved changelist?

Using -d -c flag deletes the shelved files in the specified changelist so that they are no longer available for p4 unshelve operations. By default, only the user and client of the pending changelist can delete its shelved files.


2 Answers

Starting with Perforce 2013.1, you can shelve a file in one branch and unshelve it into another, using a branch spec or stream as the mapping.

Here is the documentation which describes the new -b and -S options.

like image 56
Matt Dillard Avatar answered Oct 07 '22 10:10

Matt Dillard


I believe that you can right-click on an edited file and choose Rename/Move....

If that does not work, you'll probably have to use the command line and do p4 move -f old_file new_file and move to another branch.

Note: For what it's worth, this works for branches but not streams.

like image 27
Chance Avatar answered Oct 07 '22 08:10

Chance