Search:

PmWiki

pmwiki.org

edit SideBar

Main / P4

Changing comments on a completed submission

p4 change -f <changelist#>

Bring down a nice text copy of a diff

p4 diff -du9999 //depot/bar.c //depot/Software/foo.c > diff.txt
Does a diff of workspace file against latest check-in; can insert multiple filenames
To do specific revisions, use
p4 diff -du9999 //depot/bar.c#7 //depot/bar.c#4 > diff.txt

Notes on login

p4 -u <superuser_user> -P <superuser_password> <command>

Notes on submit

p4 submit -c <changelist#> just sends in everything, with no chance to edit note or select files
Can add a description with -d flag, but this only works for default

Might use a script that does auto-checkins after a build process. To prevent the check-in, set P4CLIENT to NONE.

http://www.perforce.com/perforce/doc.current/manuals/cmdref/index.html
http://www.perforce.com/sites/default/files/pdf/p4-p4v-cheat-sheet.pdf

Example: Auto-rollback Script

#!/bin/bash

for i in * 
do
	if [[ "$i" == *e* ]]
	then
		echo $i
		atfile=`echo  /depot/lib/$i/foo.bar`
		echo $atfile
		pfile=`echo $atfile | sed 's/e/%/g'`
		echo $pfile
		p4 sync -f /$pfile#34
		p4 edit /$pfile
		p4 sync /$pfile#head
		p4 resolve -ay //WORKSPACE$pfile
	fi
done

Page last modified on June 24, 2013, at 07:35 PM