p4 reconcile

Open files for add, delete, or edit to reconcile a workspace with changes made outside of Helix Core Server. You might need to use this command after working offline from Helix Core Server.

p4 rec is a synonym for p4 reconcile.

Syntax

p4 [g-opts] reconcile [-c changelist] [-a -d -e -f -I -k -l -m -n -t -w] [file ...]

Syntax conventions

Description

If the p4 reconcile command finds unopened files in a user’s workspace and detects inconsistencies between the workspace and the depot, it takes the following actions:

Inconsistency Action

Files present in the depot, present in your have list, but missing from your workspace

Open for delete.

Files present in your workspace, but missing in the depot

Open for add.

Files modified in your workspace that are not open for edit

Open for edit.

Files opened for delete and present in your workspace without pending resolve records

Reopen for edit.

Files that are opened for edit but missing from the client

Reopen for delete.

The list of files to be opened includes both adds and deletes

If the file sizes and contents are similar, the missing and added files are compared and converted to pairs of move/delete and move/add operations.

The following table gives a use case for certain options:

To ... Use ...
limit the scope of p4 reconcile to add, edit, or delete -a, -e, or -d options
update the have list if files are mapped in a client’s workspace to files in the depot that are not on the have list -k option
preview the set of proposed workspace reconciliation actions -n option
improve performance when reconciling changes to large files -m option
override the default behavior and ignore the P4IGNORE file -I option
consider whether the file type has changed (see File types -t option

Reconcile and implicit p4 move affects p4 status

If you do a p4 reconcile and some of the files show up as potential "adds" while others show up as "deletes", Helix Core Server compares the new files and the missing files to see if any of them appear to be the same file. If so, Helix Core Server links them as if you had used p4 move to open them. The output of p4 reconcile and p4 status will include a "... moved from" line so that you can preview how Helix Core Server matched the files before you submit them. You can also use p4 resolved after opening the files.

Options

-a Add files: Find files in the workspace that are not under Helix Core Server control and open them for add.
-c changelist Open the files to be reconciled in the specified pending changelist. If you omit this argument, the files are opened in the default changelist.
-d Delete files: Find files missing from the workspace but present in the depot. Open these files for delete, but only if these files are in the user’s have list. (See p4 have.)
-e Edit files: Find files in the workspace that were been modified outside of Helix Core Server, and open them for edit.
-f Add filenames that contain special (wildcard) characters. Files containing the special characters @, #, %, or * are reformatted to encode the characters using hex notation. After these files are added, you must refer to them using their reformatted filenames.
-I Do not perform any ignore checking, which means to ignore any settings specified by P4IGNORE.
-k Update the have list if files are mapped in a client’s workspace to files in the depot that are not on the have list.
-l Display output in local file syntax with relative paths, similar to the workspace-centric view of p4 status.
-m Compare the file sync or submit time (in the depot) with the file modification time (in the workspace) to help determine whether the file has changed. Normally Helix Core Server uses file digests to determine whether files in the workspace differ from the head revisions of these files in the depot. This can be time consuming for large files. But when the timestamps are the same, the costly digest comparisons can be skipped. This option is only relevant if you are using reconcile to find changed files rather than files that were deleted or added.

-n

Preview the results of the operation without performing any action.

-t

Allows the user to reconcile files that are in the user's directory that had their file type changed. The reconcile command opens these files for edit even if the content is unchanged. See File types.
-w Forces the workspace files to be updated to match their corresponding latest synced versions from the depot. Workspace files that are not in the depot are deleted. Files that are modified or deleted in the workspace will be replaced with their corresponding versions in the depot. This operation will result in the loss of any changes made to unopened files. The use of p4 reconcile with this option is the same as using the p4 clean command. For other options when using p4 reconcile with the -w option, see p4 clean. This option requires read permission.
g-opts See Global options.

Usage notes

Can File Arguments Use Revision Specifier? Can File Arguments Use Revision Range? Minimal Access Level Required

No

No

open

Related commands

A shortcut for p4 reconcile -n

p4 status

A shortcut for p4 reconcile -ead

p4 status -A