How to install Perforce DVCS

0

Posted by Jaime | Posted in Coding, Tools, Utility | Posted on 20-09-2016

Tags: , , , ,

Introduction
For 9 years now, I’ve used Perforce; before that, it was MKD, Subversion, VisualSourceSafe, CVS and a few others.

In the past year, I used Git.

One cool thing that Git has that Perforce didn’t have was being able to save your changes while not being connected to a central server.

However, Perforce recently added native DVCS to their source control tools so, checkouts and submits are now possible while offline.

Here are the steps you need to take if you want to use Perforce DVCS on your computer. Note, I’m using macOS, so my instructions are for that platform only.

Installation steps
Step 1: download Helix server at https://www.perforce.com/downloads/helix
You will need both p4d and p4 command line utilities, so head over to https://www.perforce.com/downloads/helix and download the “Helix Server” for your machine.

Step 2: Double-click the tar file to extract it
I think this step speaks for itself; on my computer I was able to double-click the tar file and everything appeared in a new folder.

Step 3: Make a folder for the binaries to live in
I created a bin folder in ~/Perforce/. I happen to have a dedicated Perforce folder in my home directory that I use for a lot of projects and the bin directory seemed to be a logical place to store the files.

From the command line you can type the following to make the folder:
mkdir -p ~/Perforce/bin

Step 4: Copy the binaries to the bin folder
Copy the p4d and p4 command line utilities to the ~/Perforce/bin folder (or whatever folder you just created)

Step 5: Add the path to the PATH environment variable
I edited my ~/.bash_login file using emacs to add the following:
export PATH=~/Perforce/bin:$PATH

Step 6: Load the Perforce bin path
Relaunch Terminal.app or open a new Terminal Window or source your .bash_login via
source ~/.bash_login

Step 7: Init your offline project
Here is how I got up and running:
cd WATEVA/PROJECT/FOLDER/
p4 init -C1 -n

The extra settings after init tell p4 what case-sensitivity is should use and whether or not to enable Unicode support. If I didn’t add those, p4 would try to find a server to copy those settings from and that won’t work for me.

Step 8: Enjoy
From here, you use the Terminal.app and p4 to perform all of your Perforce commands and enjoy the goodness that is Perforce… like the super-large-file-support-without-choking feature 😉

A package manager for Xcode named Alcatraz

0

Posted by Jaime | Posted in Coding, Tools | Posted on 25-09-2014

Tags: , ,

I learned about a package manager for Xcode named Alcatraz when I attended CocoaConf in San Jose earlier this year.

Extending the functionality of Xcode through plugins has been something I’ve been looking into for a while and the only plugins I knew about in the wild could only be found through Google searches or on NSHipster.com

alcatraz_xcode_packagemanager

The tool makes it much easier to find plugins for Xcode. Buuuut, it actually also serves up themes, templates and more, all from a menu available within Xcode.

Installation is also simple. Type in a single Terminal command and hooorah, it’s installed: curl -fsSL https://raw.github.com/supermarin/Alcatraz/master/Scripts/install.sh | sh

Oh, and if you are looking to attend an Apple developer conference, you should definitely consider CocoaConf: the attendee group is primarily developers, attendees and speakers are easy to approach and exchange ideas with, and as they had advertised on CocoaConf’s site, the food is good.

Windows disk space analyzer

3

Posted by Jaime | Posted in Tools, Utility | Posted on 11-03-2014

Tags:

So, if you need a good program to show you where your disk space is being used, in Windows, check out Space Sniffer

Perforce and Xcode5

3

Posted by Jaime | Posted in Tools | Posted on 06-11-2013

Tags: , , ,

In a previous post, Perforce and Xcode4, I created applescripts to work with Xcode4 and Perforce.

I updated the AppleScripts to work with Xcode5 only and added a couple of new scripts.

One, called p4_file_renamed.scpt, is used to update the renamed file Perforce when you are using Xcodes rename functionality, either directly or through the refactor functionality.

The other two scripts get the filename of the currently selected file or the full path of the file which is useful for when you want to find a file by path in P4V.

You can download the file here: xcode5_p4_applescripts