How You Can Develop Faster With P4V 2020.1
It’s time to take a look at P4V — the visual client for Helix Core version control. There are so many features to be excited about in the 2020.1 release!
Let’s review how it can help your teams develop faster.
First, How Does P4V Work?
P4V runs on PC, Macintosh, and Linux OS machines. It’s a free, desktop application that gives you an easy-to-use, graphical environment that enhances productivity. P4V is roughly comparable to the various Git GUIs out there in the world — such as GitKraken, Sourcetree, and the GitHub Desktop.
A few years ago, tools such as these were frowned upon by veteran developers, who preferred the command-line. But in the case of P4V, you can see the command line equivalent of actions right in the UI. This allows a junior developer to more easily learn the commands and syntax of very complex operations. It also helps lessen the learning curve for anyone new to Helix Core.
What has made these desktop applications like P4V grow in popularity is that they improve how everyone visualizes their environment. This makes examining the relationship between branches and navigating codelines and folders easier. Developers can always find and work on the right files.
Recent Upgrades to HTML and API Tools
The P4V team has been busy over the last few releases. One great example is the debut of major UI improvements, which included a new dark theme.
In 2019.2, P4V switched from Apple’s WebKit to Google’s Chromium. This modernized P4V and provided performance enhancements. Along with this upgrade, P4V got new APIs. The old JSAPI was upgraded to the new P4VJS API. This laid the groundwork for exciting enhancements bringing new functionality.
Perhaps the most exciting development was the addition of HTML Tools. These provide a powerful, easy way to add functionality to P4V. Using HTML Tools, you can connect P4V users to other systems in your toolchain, without having them change context, use another application, or go to the command line. Using this feature, you can specify whether your HTML Tools display inside the P4V user interface either as tabs or windows.
The tabs show up next to other standard Perforce tabs, such as files, Streams, workspaces, etc. There is a server config that lets you control whether or not users are allowed to create their own tools.
Finally, these tools are kept in centralized storage. Then they can be securely pushed out to clients. As a Perforce admin, you have full control over the deployment of your HTML Tools into the user community.
Customize Developer Workflows with HTML Actions
In the past, admins created custom (non-HTML) tools for P4V. One implementation of this feature let the admin implement actions that would occur before the submit dialog box. It was used, for example, to collect additional data from users, or directions to users to match workflows.
But with P4V 2020.1, you can use HTML Actions to completely replace the submit dialog box with your own. You can also choose to implement a pre-page that displays as the developer interacts with it, but before the standard submit dialog box.
Using HTML5 and HTML Actions, the sky is the limit in terms of integrations you can build. You can even use this to enable post-submit actions, which happen after the Submit button is pressed. Use this tool to enhance developer productivity, for example:
- Update colleagues on your work progress automatically via Slack or Microsoft Teams.
- Spin up a container on your local machine to do some testing.
- Use integration with Jira to get your next work item.
Stay tuned for future releases where this functionality is extended to other operations, like Merge/Integrate and Shelve.
Work With Git Repos
Using P4 — the Helix Core command-line interface (CLI) — you’ve been able to work with Git repos in the Helix Core server using Helix4Git. Using the command line, you could create Perforce workspaces that include assets from Git repos and Helix Core depots, such as:
- Code and non-code.
- Text and binary files.
- Very large files.
With the latest release, some of that that functionality has been extended to P4V. This is great for teams using hybrid workspaces, contracting out to third-party developers, or build engineers that combine assets from multiple VCSs.
Now you can browse Git files and folders, Get Latest Revision, Get (Specific) Revision, and create Hybrid Workspaces from the GUI to combine assets from Helix4Git repos and Helix Core depots. Use this workspace for testing and debugging, and other automated processes that only require reading the combined workspace assets. For now, you’ll still have to go outside of P4V to make changes to files stored in Git. Stay tuned for more to come!
Bring the Power of Perforce to Git >>
Manage Large Changelists
A lot of our customers work with extremely large numbers of files. It’s not uncommon for Helix Core depots to have millions of files. Bringing down a lot of files from the depot into your workspace — say 50,000 — can take some time. Once the files are on your machine, there are some change actions that display file lists that potentially can make P4V slower as a result.
For quite some time, we’ve allowed administrators to limit the number of files P4V shows in lists via a global server configuration setting. We also have let individual users control how many files they want to see in the interface. Prior to this release, the solution was to simply not show you the files in the pending and submitted changelist tabs once this limit was met.
P4V would display a message. For example, “There are 1,000 files in the changelist.” This would alert the user that the limit has been exceeded, and there are more files than shown. In the submit dialog box, for example, it would show you a simple plain text view of all of the files in the changelist. In this view, while it was possible to edit the list of files, mistakes could be made which could lead to a completely or partially failed submit. Other dialogs such as Shelve and Unshelve did not honor the limit and could therefore lead to a system hang.
How To Manage Large Changelists in 2020.1
In 2020.1, the same message will let you know how many files in total are in the changelist. However, in the submit dialog box, there is a new interface. This lets you scroll through a listing of all the files in the changelist. Simply remove which files you do not want to submit by selecting them and choosing the remove option.
You can also search for desired files in the list based on criteria such as starts with, contains, etc. The new interface guarantees valid file content, meaning you will never end up in a complete or partially failed submit. In addition, users can still context click files to take actions like diff or viewing file and revision history before proceeding.
This behavior extends to other change operations such as Shelve, Unshelve, Revert, and Resolve. Working with large changelists inside of P4V just got a whole lot easier.
Visualize More and Develop Faster
At Perforce, we are here to help your teams move faster. Using P4V helps teams visualize development so they can build complex products. P4V also offers unique features such as:
- Time-Lapse View — View and contrast versions in one window.
- Revision Graph — Trace integrations across branches.
- Perforce Streams — Get guided branching and merging.
We also offer plugins and integrations for everyone on your team. Not a Helix Core customer?