5

I want to create a private branch folder in a depot using perforce visual client. Can somebody tell me how to do it? I looked up on Google but there is so little help for a P4V user.

Restating the question:

I have created a local directory: c:/depot/abc/myfile.txt. My p4v is mapped with the central repository as //depot... c:/depot/...

How do I submit abc/myfile.txt to the repository?

RJFalconer
  • 10,890
  • 5
  • 51
  • 66
Anand
  • 11,872
  • 10
  • 39
  • 51

3 Answers3

7

After reading your question, it sounds like you don't have any files in your depot yet? If that's the case, then you just need to add the files to your depot, not integrate. Here's how to do that:

  1. In the edit workspace dialog, set the root to c:/depot
  2. Then, change your workspace mapping to //depot/... //<workspace-name>/... as leaving the slash off as it is in your question can cause problems.
  3. In the P4V workspace view, find the file that you want to add to the depot.
  4. Right click that file, and select "Mark for add..." which will add it to a pending changelist.
  5. Repeat step 3 for all the files that you want added (you can also multi-select files and then mark them for add).
  6. Once you've got everything marked for add in a pending changelist, right click that changelist and pick "Submit" to commit the files to the depot.
Mike O'Connor
  • 3,813
  • 24
  • 27
  • I am getting this warning at step 3: file(s) not in client view. What am i missing here? – Anand Nov 29 '11 at 05:47
  • Ah, I think I know what's going on. I added a new first step, and made an adjustment to what's now the second step. Try again from the beginning. – Mike O'Connor Nov 29 '11 at 16:46
2

Right click on the branch you want to branch from, and select Integrate(if it's 2011.1 you would select "Merge/Integrate") Then in the box that pops up, type in the target.

Note that you must have submit permissions in order to create the branch in the new location. So

//depot1/main/... //depot2/sandbox/...

If you have submit permissions to //depot1 but not to //depot2 you wont' be able to branch from //depot1 to //depot2, but you can branch from //depot1/main/... to //depot1/sandbox/... as long as you have permissions for all of //depot1

aflat
  • 4,329
  • 1
  • 20
  • 23
  • 1
    Thanks George. I tried it, but i am getting the same message as before: "No target file(s) in both client and branch view" . Can you please tell me what this means and how to resolve this? – Anand Nov 23 '11 at 05:44
  • 2
    That message means that you do not have the new branch location in your workspace view. You can go to `Connection`->`Edit Current Workspace` to add the new branch location to your view before you create it. – randy-wandisco Nov 23 '11 at 14:54
  • 2
    p4-randall is right. If you workspace looks like `//depot/main/... //mywork/main/...` and your' trying to branch to //depot/sandbox, you need to change your workspace to `//depot/... //mywork/...` I don't think you can add //depot/sandbox/... to your workspace since it doesn't exist yet. – aflat Nov 23 '11 at 19:02
2

If you're just starting out with P4V, consider spending some time reading this: http://www.perforce.com/perforce/doc.current/manuals/p4v-gs/index.html and this: http://www.perforce.com/perforce/doc.current/manuals/intro/index.html

There are many more docs at the Perforce site, but these are a good place to start.

Bryan Pendleton
  • 16,128
  • 3
  • 32
  • 56
  • I have found once you have some basic understanding of how P4 manages your files, the documentation is usually very helpful in showing you how to achieve what you want within the command framework. I'd also add that I like to display the log window and review the commands that are shown. – Michael Mathews Dec 01 '11 at 23:15