p4 reopen

Move opened files between changelists or change the files' type, or move the client's stream spec to a different changelist.

Syntax

p4 [g-opts] reopen [-c changelist] [-t filetype] file ...
p4 [g-opts] reopen [-c changelist] -So

Syntax conventions

Description

for files

p4 reopen has the following uses for files:

  • To move an open file from its current pending changelist to pending changelist changelist, use p4 reopen -c changelist file
  • To move a file to the default changelist, use p4 reopen -c default
  • To change the type of a file, use p4 reopen -t filetype
    • If file patterns are provided, all open files matching the patterns are moved or retyped. The two options can be combined to move a file and change its type in the same operation.

for streams

p4 reopen has the following uses for a stream:

  • To move an open stream from its current pending changelist to pending changelist changelist, use p4 reopen -So -c changelist
  • To move a stream to the default changelist, use p4 reopen -So -c default

Options for files

-c changelist

Move all open files matching file pattern file to pending changelist changelist. To move a file to the default changelist, use default as the changelist number. (See Examples below.)

-t filetype

When submitted, store file as type filetype. All subsequent revisions will be of that file type until the type is changed again.

See File types for a list of file types.

g-opts

See Global options.

Options for streams

-c changelist

Move the open stream spec to pending changelist changelist,
where changelist can specify a changelist number, or default for the default changelist.

-So

Move the the stream spec only.

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

Examples for files

p4 reopen -t text+k //...

Reopen all open files as text files with keyword expansion.

p4 reopen -c 410 //depot/proj1/... //.../README

Move all open files under directory //depot/proj1 or that are named README to pending changelist 410.

p4 reopen -c default -t binary+S //....exe

Move all open .exe files to the default changelist, overwriting older revisions of those files in the depot.

Examples for streams

p4 reopen -So -c 411

Move the stream spec of the client to changelist 411.

p4 reopen -So -c default

Move the stream spec of the client to the default changelist.