0

I am using Perforce in my work environment. It is actually not Perforce Shell but it is basically a perforce UI called P4. Now, P4 is able to do basic operations for me like check in and check out. However, i come from Git environment and I was expecting extensive support for branching.

Now, I have a lot of problems when my manager told me to not merge my feature to the server and hold on it because it needs to go in for next release. Now, in Git world we can jus tleave that feature branch as it is and load develop from origin and start working on new feature.

in P4 world, everything is convoluted. I faced with an option called "Move files to different changeset". When I moved all the files to a different change-set, my default still remains the same. so to wipe out my changes completely, I have to delete the folder and load new copy form the server.

is this the right way to do it?

Also, How can I change my current change-set from Default to to the other change set that was created as a result of my "Move files to new changeset operation"?

Lost
  • 12,007
  • 32
  • 121
  • 193
  • Why would you need to move files to a different changeset? You should be able shelve your existing changeset. Also, there is no such thing in Perforce as a "current changeset". If you want to add files to an existing, pending changeset, you can do `p4 edit -c CHANGE` (or `p4 reopen -c CHANGE` for a file that was previously opened). The "default" changeset is the one that operations apply to when you neglect to specify a particular change number. – jamesdlin Oct 16 '13 at 11:26

2 Answers2

0

Here's a good place to start: http://www.perforce.com/perforce/doc.current/manuals/p4v-gs/01_p4v-gs.html

Perforce has a very rich set of functionality, but the interface is different than git, so you'll need to spend a little while and learn what's the same and what's different.

Bryan Pendleton
  • 16,128
  • 3
  • 32
  • 56
0

If you're trying to save your changes for later on, you can shelve the files that you don't want to submit. (right-click the changelist or the individual files, and click 'shelve'.) This places your changes on the p4 server for safekeeping. You can optionally keep your changes locally as well, or revert your local changes and just let the changes live in the shelved files. If you revert your local files while you shelve the changes, you should have the same base fileset as before your changes.

When you want your changes later on, unshelve the files from the changelist and you're where you left off.

If you want to create another branch, and keep working with your changes there, use p4 integrate to create the new branch based off the original branch. You have to specify a new target location (where your new branch will go). When you do the integration, it will create a changelist holding a copy of all the files you're branching. You must resolve and submit that changelist for the branch to be created.

Finally, to move your opened files (the files in your changelists) to other changelists, either right-click on the files and choose "Move to changelist" (where you can specify the target changelist), or right click on the changelist itself if you want to move all the files it contains.

the_cat_lady
  • 852
  • 1
  • 9
  • 16