Perforce Public Knowledge Base - Mapping Subversion Terms and Commands to Perforce
Downloads Blog Company Integrations Careers Contact Try Free
Menu Search
Reset Search



Mapping Subversion Terms and Commands to Perforce

« Go Back



A comparison of features, terminology, and commands in Perforce and Subversion.


This comparison is for the experienced Subversion user who is new to Perforce. The following comparisons are high-level and intended to help you take advantage of your Subversion knowledge to learn Perforce.


The following table compares Subversion terms to their Perforce equivalents.

Subversion term Perforce term
branchcodeline or stream
check outsync
mergeresolve, merge
taglabel, tag
working copyclient workspace
modefile type
reserved checkoutlock or exclusive-open



The following table lists Subversion commands and their closest Perforce equivalents.

SVN command  Perforce command(s)DescriptionRemarks
svnadmin create  p4 depot Create a new depot (repository). 
svn import  p4 reconcile Add a tree of file(s) to the depot. The specified file(s) are linked to a changelist.Perforce: The files are not actually added to the depot until the changelist is sent to the server with p4 submit.
svn add p4 addOpens file(s) in a client workspace for addition to the depot. The specified file(s) are linked to a changelist.Perforce:The files are not actually added to the depot until the changelist is sent to the server with  p4 submit.
SVN: The files are not actually added to the repository until the changes from your working copy are sent to the server with svn commit.
svn checkout  p4 sync  then
p4 edit
Copy files from the depot into the client workspace and open file(s) for edit.Perforce: p4 sync populates the client workspace. Use p4 editto open specific file(s) for edit.
SVN: files can be changed once they are checked out.
svn commit  p4 submit Send changes made to open files to the depot.Perforce: Changes are grouped into changelists - an atomic change transaction for a set of files all submitted together.
SVN: An svn commit operation publishes changes to any number of files and directories as a single atomic transaction.
svn update  p4 sync Bring the client workspace into sync with the depot. 
svn status  
p4 fstat
p4 opened
p4 have
p4 files
Display information about workspace files. 
svn help  p4 helpRequest help. 
svn log  p4 describeProvides information about changelists and the changelists' files. 
svn info  p4 infoDisplay information about the current client and server. 
svn list  p4 filesObtain list of files. 
svn copy  p4 integrate or p4 copyCopy a file. 
svn move  p4 moveMove a file. 


Subversion and Perforce use different workflows. Here below are several of the important differences in Perforce:

  1. Pre-defined workspaces
    • Subversion creates a new "working copy" by using the "svn checkout" command.
    • Perforce defines a new "client workspace" by using the "p4 client" command, then populates it by using "p4 sync"
  2. Read-only workspace files (default)
    • Subversion files are already writeable when the working copy is created.
    • By default, Perforce requires that files be made writeable using "p4 edit" before changing them. If desired, workspace files can be made always writeable by setting the client workspace option 'allwrite'.
  3. Central tracking of user edits
    • Subversion does not keep track of what files a user has checked out and modified.
    • Perforce tracks what files users have in their local workspace and which files are actively being edited.
To convert from Subversion to Perforce, use p4convert-svn, a Java based Subversion to Perforce conversion tool which is fully supported by Perforce.

Merge information

The option attempt to add integration credit is turned off by default


This is only for merge history; branches, rollbacks, renames in integ history is tracked by default. No content is missing, just merge info between branches. Subversion didn't track merge information until around version 1.7; setting the mergeInfoEnabled adds this new information into Perforce's Integration credit. Without the flag you just see edits, but no merge arrows.

Merge info in Subversion and Perforce integration credit are different. It's very much a square peg/round hole issue, so you won't see results to match up with the two integration engines. There are a few cases where SVN will say a branch is up-to-date, but Perforce will say there is missing credit and vice-versa.


Related Links



Was this article helpful?



Please tell us how we can make this article more useful.

Characters Remaining: 255