Perforce: P4V option to 'add to client view'? (It exists in P4Win) - perforce

In the Perforce realm, the P4Win GUI is now "legacy" and the new P4V is supposed to fill in the void (and it does, most of the time).
There was one very useful (albeit rather hidden) option in P4Win that allowed adding a depot path to the client specification in a few clicks.
Is there a similar option available in P4V? ... because I can't find it.
(I know I can do it manually.)
Here is the P4Win feature, in all its glory:

This is typical for the P4 GUI (old and new) - it can do lots of things, if only you knew where to look (hint: usually not where you'd expect to find it).
There IS an option in P4V similar to the old 'Add Files to client view' from P4Win, only a lot more powerful! (it's a bit hidden and IMO not as streamlined as the original)
You can't find it in the depot view, where you probably ARE when you need it. Instead, go to Workspaces view, right-click the workspace definition and 'Edit' it (or dbl-click it then click 'Edit').
Notice the tabs on top of the 'Workspace editor' window that just opened. Select the 'View' tab. There is a lot going on here, including (apparently) information on the new 'Offline' mode.
To get to the point: in this window, find the piece of depot you need and right-click it.
Nirvana! There are no less than 6 menu options (!) that allow you to specify how and what to add OR remove to/from the workspace definition.
There's even an 'advanced' mode that looks a bit scary :-&

For P4V version : Rev. Perforce Visual Client/LINUX26X86_64/2012.1/490402
Released on 2012 July 02
Do as follows
Go to Connections -> Edit Current Workspace
In the Basic tab , Workspace Mappings , Right click on the tree and Include Tree.

I don't think that there is, you need to open the Workspace view and make your changes there.

Edit your workspace and change the view to include the relevant directory. Although I use P4V everyday and 'Add to client view' seems to ring a bell....

Of note, they added this feature into the P4V client at some point. You can now right click on a path in the depot tab and choose "Map to Workspace View...". It will bring up the workspace editor with the path added.

Related

How do I remove my changes on OpemCms 10.0.1?

I'm currently working with OpenCms 10.0.1 and have just created a "sub-sidemap" under "Sidemap" for a "Content page". How do I undo this? Nothing is published yet, so it is not published and only visible to people who can edit the page.
Question formulated differently: How can I delete / reuse my change?
I'm using FireFox.
it is not easy to answer your question, because I am not sure what you really want to do.
If you just want to delete your newly created folders you can easily delete them by right-clicking on the folder icon and choose "Delete". As your folders have never been published, they are deleted instantly. You could also change the folder type by selecting "Advanced" --> "Change type" in the context menu.
In case of an already published file or folder you can choose "Undo changes". This will undo all changes since the last publish.
If you are unsure, what kind of changes where made, you can compare versions by choosing "History" from the context menu.
Last but not least you can as well restore already deleted files by choosing "Advanced" --> "Restore deleted".
HTH
Have a nice day!
Best regards
Kai

P4V Clear the drop-down menu in the tree view for workspaces

In P4V (Perforce visual client) there is a tree view, where you can browse your files. In the top of that view, there is a dropdown menu, where you can select the workspace you want to browse through.
I have just deleted a whole bunch of old workspaces, but they still show up in the drop-down menu. I cannot find any place to get rid of them.
I will be happy to know how to either:
remove specific workspaces from the drop-down, or
remove all workspaces from the drop-down
I used P4V Rev. Perforce Visual Client/MACOSX106X86_64/2014.1/827578 and had 10 workspaces listed in the drop down. As I deleted them they were removed from the drop-down. What version of P4V are you using?
I am using P4V (on Windows 7), dated 2013 March 20 and versioned:
Rev. Perforce Visual Client/NTX64/2013.1/611291
My problem was somewhat different than that described in the question. A number of my old workspaces were showing up in the P4V workspace drop-down menu, even though these old workspaces no longer existed on the server. (I did not delete those workspaces; I'm guessing they were deleted by an admin.)
In my case, I found a way to remove these orphaned names from the workspace drop-down menu. Here's what I did: For each workspace name in the drop-down menu I wanted to remove, I:
Recreated a workspace with the identical name. (I found that the root folder that I assigned to the workspace did not matter.)
Immediately deleted the workspace.
This resulted in the workspace name being automatically removed from the workspace drop-down menu.

What happened to "Exclude from Source Control" in VS2012

I want to exclude some of the files in code folders from TFS 2012 source control.
Before VS2012 this was done by the "Exclude from source control" command available in "Source Control Explorer"s right-click menu. But in VS2012 I can not find it.
Does anybody know where it is ?
(I am using a "Local" workspace by the way.)
When you click on "Detected Changes" in the Team Explorer pane, "Promote Candidate Changes" window opens. This window allows you to select among detected changes and promote them to a source controlled item.
In this "Promote Candidate Changes" window, you select a file (or multi select files with Shift), right-click on it and a context menu pops up which contains an "ignore this local item" option. If you you click on it, selected files are excluded from source control.
Visual Studio adds a file named ".tfignore" to the source control mapping root, which contains names of all files to be ignored by source control. (Previous TFS versions did not produce this file but they were all server workspaces. Since this is a "Local" workspace, filenames to be ignores need to be kept in the workspace)
I have the real solution.
In the "team explorer" pane, in the "pending changes" tab, right click a new file you don't want in source control, and click "undo".
It will leave the file in the project, and exclude it from TFS. In the project window, the file will never have a "lock" icon on the left of its name.
This is the easiest solution:
1. Select the file(s) in Solution Explorer
2. Go to File -> Source Control -> Advanced
and here it is
Keep in mind:
If you right click a file in Solution Explorer you only find "the most important options" not all :)
In VS2013 this is back but has been moved to the file menu: -
Select the file in the Solution Explorer
File > Source Control > Advanced > Exclude xxx.xxx from Source Control
I know that this is slightly off topic but thought it may help someone.
I have Visual Studio 2017 Enterprise, and the option to exclude does not exist under File->Source Control. My solution to this problem was to open the Source Control Explorer, and remove the item I wanted to exclude.
It's in the Pending Changes pane separated to Excluded Changes and Included Changes sections. It allows filtering and excluding or promoting items between sections.
!

How to open the actual file from changeset details in Visual Studio 2012, and not some hashed read-only server copy?

This is the first time I've tried this in a VS, much less VS 2012, so if the answer is common knowledge, I guess I'm just not that common. (Yeap, Google failed me as well --- or my Google-fu just needs some oiling.)
I'm looking through my TFS code repo history, and from the list of changesets, I opt to view changeset details. Up on the VS 2012 right sidebar, I get a list of all changed files for this particular changeset.
However, I want to open up one of these files and modify them directly (basically for purposes of light code review and housekeeping), so I right-click on one, and select Open.
Unfortunately, this doesn't open up my local copy of the file, but instead (seemingly) downloads the file from the server and gives me the server copy, with a modified filename (suffixed with a short hash). I can't modify this at all.
Is there a way to open my local file copy from the changeset details?
What you could do is right click the file.
Then choose open in source control explorer.
Double click the file there.
Bob should be your uncle now.
If you right click and compare it to your workspace version, that will open a diff between the workspace version and the changeset version. I don't believe there is a way to open the local version of the changeset file directly, as that version doesn't really exist in your local workspace. What you are opening when you open it from the changeset is the specific version associated with that changeset. The file may not even exist in the current solution, so opening the workspace version in same cases wouldn't even be feasible (or you may have never gotten the file).
To the best of my knowledge there is no good way to do this (I wish there was). It's a bit time consuming, but you can get the same effect with a bit of manual effort:
Open the changeset, rollback changes, go to pending changes, and open all of the files. After the last file has opened, go back to pending changes and undo changes (i.e. your rollback). All of the files from that changeset should now be current and open in visual studio.

How do I create a patch from diff between revisions using TortoiseSVN?

I'm working on a project where Subversion is used to maintain version control. I use TortoiseSVN to access the project repository.
Some changes were made between two revisions on a project (let's call them rev1 and rev2), and I want to be able to apply these changes to a working copy somewhere that temporarily does not have access to the repository.
I right-clicked on a project folder, clicked 'SVN show log', selected the two revisions and selected 'Show changes as unified diff'.
This causes a window to be shown, displaying output that very much looks like a patch file that I could save. Unfortunately, I find that there is no option in the window that lets me save this as a patch file.
How can I create the patch file?
The next version of TortoiseSVN (1.7.x) will have that save option. In the meantime, you can configure a plain text editor as your unified diff viewer:
Settings dialog->External Programs->Unified Diff Viewer
There you could, for example, specify notepad.exe as your diff viewer.
One way to achieve you goal is to right click on the revision in the TortoiseSVN log and choose "Merge revision to...". Then you select you local working project and click OK.

Resources