I'm an admin for the system, so I can see all depots in our p4 server. However, I only actually care about a handful of them.
How can I filter which depots are displayed based on which workspace I have selected? I've tried editing the workspace, context-clicking the depot, and selecting exclude tree, but this doesn't work. In my mappings, I can see the only depots I want to view.. however, I still see all available depots in the workspace Depot tab.
I suspect the problem might be your settings. Go to Search-->Filter Depot and select Tree Restricted to Workspace View
First answer should do the trick. There is another way to get to that option quicker using the filter in the main view
Related
At work, we use a version control system called Perforce. Bizarrely, it makes all the files downloaded from the repo readonly. It then demands you tell it (p4 open) whenever you want to edit any one of them. This is tedious, and really interrupts my concentration--I just want to edit a file on my computer, not think about version control.
Is it possible to have a less intrusive workflow? I'd like to edit files on my computer as I see fit. Then when I'm done, group and title them into a commit/changelist.
You can totally control this workflow.
Here's what to do:
Change your client options to specify "allwrite"
re-sync your files and they are all now left writable
Edit files as you wish
When you are ready to submit, run 'p4 reconcile'. It will figure out what files you have edited, what files you have added, what files you have deleted.
Submit your changes
As you say, edit your files on your computer as you see fit. Then, when you are done, group and title them into a changelist and submit them.
Here's some docs for the "allwrite" option: http://www.perforce.com/perforce/doc.current/manuals/cmdref/p4_client.html
If you work in Visual Studio, then I would highly recommend checking out P4VS. I think that would resolve most, if not all, of the issues you're having with the workflow.
You could also use the "Allwrite" option in your workspace, which will leave all files writable. If you go this route, you'll still need to mark the files for edit and group them into a changelist to a submit, but it won't interrupt you while you're programming.
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?
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:
In the edit workspace dialog, set the root to c:/depot
Then, change your workspace mapping to //depot/... //<workspace-name>/... as leaving the slash off as it is in your question can cause problems.
In the P4V workspace view, find the file that you want to add to the depot.
Right click that file, and select "Mark for add..." which will add it to a pending changelist.
Repeat step 3 for all the files that you want added (you can also multi-select files and then mark them for add).
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.
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
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.
On P4V windows app,I can select a particular user and a workspace and see the user's list of changes on that particular workspace. When I click a particular changelist from the list of changes, I can see the changed files under the 'Files' tab and then see the actual revisions for a particular file.
For some reason I cannot see the revised file named in some rare cases and when I click on files tab I see a message saying changes might protected or obliterated. Is it possible to do something to prevent other users from finding out what changes you have made for a particular changelist?
Yes it is possible. A changelist may be marked either public or restricted, and a restricted changelist requires permission to view: http://www.perforce.com/perforce/r10.2/manuals/cmdref/describe.html#1040665. It is the 'type' of the changelist that controls this: http://www.perforce.com/perforce/r10.2/manuals/cmdref/change.html#1040665
Here's a frequent situation: You have about thirty files checked out into a specific pending change-list. After working on those files, and before submitting them, you needed to move them to a folder (external to deposits, so a simple "Integrate" wouldn't be suitable).
Using the "Show In - Explorer" option, you'll get a lot of window popped-up. And that's just painful (and sometimes, the system just cannot open all of them).
So, question is, is there a simple way to copy-paste multiple files from a change-list without doing it individually?
You can do this with a custom tool.
In P4V, open the custom tools manager via the Tools->Manage Custom Tools... menu item
Click New->Tool... to open the Add Custom Tool dialog and enter these parameters (xcopy isn't the ideal app for this, but I'll talk about that later1)
alt text http://img202.imageshack.us/img202/6678/p4editcustomtool.png
Now you will be able to select all the files in your change list, right click on them, and a new item will be available in the context menu Copy selected files to another location..."
alt text http://img97.imageshack.us/img97/4003/p4vcustomtoolincontextm.png
An input box will appear, asking you where you wish to copy the files.
alt text http://img132.imageshack.us/img132/7612/p4locationprompt.png
Click OK and the files will be copied to the location you entered in the input dialog. Maybe...
1There are some problems with xcopy:
the target directory must already exist
it doesn't seem to work if the path contains spaces
if the process fails, you're process list will fill up with a bunch of instances of xcopy.exe that are stuck trying to do who knows what
the custom tool will no longer work if the previous condition occurs
I tried robocopy also, which would be perfect if there was a way to pass it the source directory, but P4V custom tool editor doesn't provide the parent directory as a parameter. Ideally, you should write your own file copy utility, if this is really important to you. It wouldn't require that much effort.
Lastly, the P4V custom tool editor offers a file browser, but not a folder browser, and the latter is what you really need for a tool such as this.
So, play around with the custom tool thing. You might be able to come up with an answer to your problem.
I know you want to do these things outside of Perforce, but the best I can think of is if you create another workspace specifically for exporting files. You can sync your Perforce workspace to contain only the files in a particular changelist.
In this workspace, try giving the files in your changelist, after it is submitted, a particular label. If you sync your workspace to this label, it will delete every file that does not have this label based on this Perforce page. (do Find for label in that page)
p4 sync #label_name
This involves Perforce, but it does provide a way to get only the files you want.
I believe you can also accomplish this only using changelist numbers, but it may be more complicated. I'm not 100% sure this works
p4 sync #none
p4 sync #changelist,#changelist
I think this will sync files only in this changelist.
Using P4V 2009.2.
I have used P4Win in the past, but this is a new setup for me.
The problem is that the files I have checked out disappear from the changelists, so I cannot check them in.
To reproduce:
Check out a file, make a change to it.
Go to the 'pending changelist' tab.
There will be a + sign on the default changelist.
Click on the plus, or on the changelist line, the plus will disappear, there will be nothing in the changelist.
Try to check the file in by right-click on the file itself, the changelist dialog will show up but NO files are listed.
You can transfer the file to a new changelist, the same thing happens.
Looking at the file in the 'checked out by' window does correctly show the changelist number & description.
It sometimes happens to me, and what I normally do is change workspace and then change back again. Not sure if there is an easier way to get it to realise the files are checked out.
the only thing I can imagine is that you are looking at a different client workspace. Notice that the "Pending Changes" tab has a filter on the top, where you can separately filter for folder/files, user and workspace. Maybe the filter is set to something so that it doesn't match the client workspace where you have actually checked out the file.
Good luck,
Henrik
You may get this if the perforce server has not been upgraded. Old versions of P4D have this error: http://kb.perforce.com/article/1167/opened-files-missing-in-default-changelist
If that is not an option, use p4Win.
I agree with jhwist,sounds like your looking at a different client spec.
P4V is a bit confusing on this front, IMO and I personally prefer P4 Win but to check, open up a command prompt and type p4 changes -s pending -c YOURCLIENTSPEC - chances are that the changes you think you have aren't in your current clientspec
This can happen sometimes and in my experience it is a refresh issue with p4v. Often simply closing the pending tab or reopening p4v solves the problem.
In my case, the pending List has over 4000 files, (due to eclipse created so many files after mvn tasks) so none of them are shown. I created a different pending list, then cleared all contents, then moved the files to the new change list. Then it is appearing in the new change list.
Modify the file directly in the correctly mapped client folder (i.e. your current workspace). You will see the changelist for sure. As jhwist mentioned clear filters if any and choose your current workspace (since you may have many)