Abstract
Assembla is the FIRST provider of Perforce ON DEMAND. You can create a new Perforce project in under 60 seconds.Perforce's shared version service enables teams to collaborate on important assets like software code, documents, images, and other files. Set up Perforce Streams to increase agility and scalability when merging, building, and testing code.
Teams can take advantage of the power of Perforce version management combined with Assembla’s collaboration and project management features. When you sign-up for Assembla’s hosted offerings, you can get a complete project management toolkit for your team. The Perforce repositories offered by Assembla provide a single Perforce stream depot. Perforce streams are designed to be a simple, convenient framework for branching and merging, and are a perfect complement to the rest of Assembla’s intuitive tools. You can use any regular Perforce application, like P4V, to work with your source files. When you submit, your files are sent to the Perforce repository hosted by Assembla, where you can use code review and other tools to work with your team.
Sign up for a Portfolio + Perforce account
Install and setup Perforce
To create a P4 repository in your Assembla project, you will need to first install the P4 tool in your project. To do so, open the project Admin page at - https://www.assembla.com/spaces/<project name>/admin/tools
Then select P4 from repository section of the tools page and click on the 'Add' button.
This will install P4 in your project as shown in the screenshot below:
Now that you have added the P4 tool in your Assembla project, you will need to get a Perforce Client program. Perforce provides a command line client, graphical client, and IDE plugins on most platforms. Download the program you prefer - all Perforce client programs are available for free download.
1.1 Once you have installed p4 in your computer you'll need to make sure that you are able to connect:
GET STARTED WITH YOUR BRAND NEW DEPOT:
1. Run 'p4 info' to make sure you can connect.
2. Login with 'p4 login' using your Assembla password.
3. Create a client for the main stream by running 'p4 client -S //depot/main -o | p4 client -i'
Your new depot is empty. You can create new code or import existing code.
1.2 Next you'll need to set the environment variables:
CONFIGURING YOUR PERFORCE CONNECTION:
a) Windows:
p4 set P4CONFIG=p4config.txt
cd <workspace directory>
echo P4PORT=perforce.assembla.com:1666 >> p4config.txt
echo P4HOST=assembla_p4host >> p4config.txt
echo P4USER=assembla_username >> p4config.txt
To launch P4V:
p4v
b) Linux:
echo "export P4CONFIG=p4config.txt" >> ~/.bashrc
source ~/.bashrc
cd <workspace directory>
echo "P4PORT=perforce.assembla.com:1666" >> p4config.txt
echo P4HOST=assembla_p4host >> p4config.txt
echo P4USER=assembla_username >> p4config.txt
To launch P4V:
p4v
c) Mac OS X:
echo "export P4CONFIG=p4config.txt" >> ~/.bashrc
source ~/.bashrc
cd <workspace directory>
echo "P4PORT=perforce.assembla.com:1666" >> p4config.txt
echo P4HOST=assembla_p4host >> p4config.txt
echo P4USER=assembla_username >> p4config.txt
To launch P4V:
open /Applications/p4v.app
1.3 If you get an error while launching P4V, please try to set the p4config.txt file directly from the workspace path. For example:
p4 set P4CONFIG="C:\workspace_directory\p4config.txt"
Please note the following:
- When you install your p4 it asks you to select a path for your workspace. Make sure to use the same workspace directory while setting the variables.
- The P4HOST info can be found at the "Instructions" tab on your Perforce repository in Assembla.
- You might notice that the echo P4CLIENT=<workspace name> >> p4config.txt line is not included in this guide anymore. This is because it was causing some error like Partner exited Unexpectedly
ADD CONTENT:
To add new content or import existing content, go to an appropriate directory in your Perforce workspace, create or copy the content, and submit it to your Perforce repository. For example, assume you've created a workspace in the directory c:\p4\my_ws, and you want to import some code you have saved under c:\temp\code.
- cd c:\p4\my_ws
- robocopy /mir c:\temp\code src
- p4 reconcile src\...
- p4 submit -d "importing code"
On non-Windows platforms, that would be:
- cd ~/p4/my_ws
- cp -r /tmp/code src
- p4 reconcile src/...
- p4 submit -d "importing code"
FAQ:
p4 error "cannot submit from non-stream client"
This error occurs when you are using non-stream Perforce depot. Please note that Assembla's Perforce implementation can work with Stream depots only.
Perforce Processing Hangs with Large Deploys
If you experience problems with large Perforce deploys try adding the following to your Perforce configuration file.
In command line Perforce client: provide parameter -v rpc.bufsize=VALUE to the configuration file.
In Perforce visual client: add a line with rpc.bufsize=VALUE to config file of P4CONFIG env variable (usually it is ~/.p4config).
Delete a depot in my Perforce
To erase all your commits and integration history you can delete a repository from Admin -> Tools -> Then click the Delete icon next to the repository. Please note that this action is irreversible.
Is there a way to ignore files?
http://www.perforce.com/perforce/r12.1/manuals/cmdref/env.P4IGNORE.html
Is there a way to run our Assembla Perforce server in non-unicode mode?
Currently changing the encoding for individual depots is not supported on Assembla On Demand Perforce implementation, as many depots are hosted on the same server and this is a server-level setting. However you can try to convert the I/O stream encoding by manipulating the encoding type programatically.
Can Assembla import a depot so history is preserved?
It is possible to import a depot, if is is a stream depot type. If it is other type of depot, there may be some compatibility issues during conversion.
Can I use a Proxy server with my Assembla depot and how will workstations count works?
Unfortunately, we do not support Perforce Proxy – it can not pass P4HOST variable, which is required for our internal routing.
Can I create triggers?
You will not be able to create triggers as a user. But we can add triggers for you. You will need to submit your request to Support at support@assembla.com and our Operations team will take care of creating it.
Comments
0 comments
Please sign in to leave a comment.