A piggy bank of commands, fixes, succinct reviews, some mini articles and technical opinions from a (mostly) Perl developer.

Jump to

Quick reference

Showing posts with label cvs. Show all posts
Showing posts with label cvs. Show all posts

Find files in workspace that perforce doesn't know about

for file in `find . -type f`; do p4 diff -f ./$file; done | grep "not on client" | sed 's/on client/in depot/'

But the sed part doesn't work (wrong stream?)

Set file modes in Perforce

Perforce.

Edit a file and:
  • explicitly set RCS keywords to be expanded (k)
  • have the executable bit set (x)
  • always be writeable on the client (w)
p4 edit -t text+kxw

or if it's already being edited:

p4 reopen -t text+kxw

See also

p4 help filetypes

+w always writable on client
+x exec bit set on client

+k $Keyword$ expansion of Id, Header, Author, Date, DateTime, Change, File, Revision
+ko $Keyword$ expansion of Id, Header only
+l exclusive open: disallow multiple opens

[full article]

Perforce commands

p4 sync -f ./...
p4 diff -f [file]
p4 filelog -l -i -t [file] // complete history (-l = long text, -i = follow branches, -t = include times)
p4 annotate [file] // show file with changes marked

Tagging

// NOTE: If no revision specified, the head revision will be tagged
p4 tag -l ProjectName_R01 [filename]#revision // tag a specific revision of a file.

p4 files @ProjectName_R01 // list files on a tag