NAME
c4 - CVSish wrapper for perforce p4 program
SYNOPSIS
c4 help
c4 client-create -t <template> <client>
c4 client-delete -d -f <client>
c4 [-n] update
c4 unknown
c4 I<any p4 command>
i.e.: c4 add <file>
c4 delete <file>
c4 diff <file>
DESCRIPTION
C4 allows a default user, see the ENVIRONMENT section.
When passed a filename on any c4 command, c4 makes the filename absolute, with all symlinks reduced, and chdir's if possible to the first such filename. If the argument is a directory, a /... is appended. This makes it a lot more likely that perforce commands will work when issued from outside a client area. (For example: c4 add /my/area/boo/blaz.)
When a client is created in a special way, C4 makes p4
seem more like cvs
by having all files writable by default. C4 adds several commands (update/client_create) to support this, see the COMMANDS section.
COMMANDS
Any command not listed here is passed directly to perforce.
- ci
-
Alias for
c4 submit
. - commit
-
Alias for
c4 submit
. - client-create [-t template] <client>
-
Create a client specification, making sure it gets named, and setting the clobber, allwrite, and rmdir attributes as required for c4 update. Also, create a .p4config file with the name of the client in it.
- client-delete -d <client>
-
Delete a client specification in a way which leaves the database as clean as possible. Consists of the following steps:
p4 revert ...
to make sure no files are left open.p4 client
to edit the spec to remove any View: lines.p4 sync
to remove the views that were deleted from the file system.p4 client -d
to remove the client spec.rm .p4config
to cleanup the local directory. - rm [-c changelist] file...
-
Alias for
c4 delete
. - submit [-f] [normal p4 args]
-
This performs a p4 submit. In addition, it prints an error if the area is not up to date before submitting. -f overrides this check. Use -f carefully as edited files may not yet be opened for editing as they would be if the update was done.
- update [-n] [file...]
-
Update is similar to cvs update. With -n, only the actions to be taken are shown, it does not actually change anything. On a update without a -n, c4 performs the following steps:
p4 edit
any files that have been changed from the version checked out from the depot.p4 revert
any files that werep4 edit
ed, but now match the version in the depot.p4 sync
to get recent changes.Look for any unknown files not in a .cvsignore file.
It also prints a summary of each file that is modified in the client area. Lowercase letters are used for actions that were not caused by the user, and are different from cvs letters. Here are the letters, the state causing that message, and what may happen on a update.
A (A)dded in client, not yet in depot, stays Add. M (M)odified in client, different from depot, stays Modified. R (R)emoved in client, still in depot, stays Removed. U (U)pdate required, unmodified in client, new version from depot. a Never in client, (a)dded in depot, will appear. d Same in client, (d)eleted in depot, will disappear. l (L)ost in client, exists in depot, will appear. m (m)odified in client, but now matches depot, will be reverted. ? Unknown - Not in depot, not added, not in .cvsignore, no action.
Unknown files (?) should be ignored with a .cvsignore file as described in the FILES section.
- unknown [file...]
-
Prints files that are not known to perforce, and do not have a .cvsignore line. This is similar to the '?' lines printed by "c4 update -n", however "c4 unknown" may be used with standard perforce clients.
ARGUMENTS
ENVIRONMENT
- C4USER_DEFAULT
-
If specified, when a command is issued and the USER does not have a P4 license, then rather then create a new P4 user, the user in C4USER_DEFAULT will be used. This allows infrequent read-only users to share the same license.
FILES
- .cvsignore
-
Specifies files that are in the same directory as the .cvsignore that should be ignored; there will be no ?'s printed when a 'c4 update' is executed.
Ignore files are mostly compatible with CVS. The list of ignores is initialized with:
tags TAGS .make.state .nse_depinfo *~ #* .#* ,* _$* *$ *.old *.bak *.BAK *.orig *.rej .del-* *.a *.olb *.o *.obj *.so *.exe *.Z *.elc *.ln core
The patterns found in `.cvsignore' are only valid for the directory that contains them, not for any sub-directories. A single exclamation mark (`!') clears the ignore list.
The wildcards * and ? are honored, no other wildcards are currently supported.
As with CVS, comments are NOT supported!
SEE ALSO
c4
c4_job_edit
P4::C4
p4
AUTHORS
Wilson Snyder <wsnyder@wsnyder.org>