-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathPerforce_Notes.txt
More file actions
93 lines (81 loc) · 2.45 KB
/
Perforce_Notes.txt
File metadata and controls
93 lines (81 loc) · 2.45 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
-------------------
Perforce (P4) Notes
-------------------
Questions
---------
- jobs
- labels
- changelists
Install
-------
Configure
---------
- mkdir ~/workspaces/gdc
- cd !$
- export P4CLIENT=gdc
- p4 set P4CLIENT=$WORKSPACE
- p4 client
(Edit "View"s if desired)
- p4 sync
- ignore files
- create ignore file (e.g. at workspace root dir)
- set P4IGNORE to path/name of ignore file
.bash_rc
--------
# set up for Helix Perforce
export P4CLIENT=$P4_WORKSAPCE_DIR
export P4CONFIG=$HOME/.p4.config
export P4DIFF="$(which colordiff) -u"
export P4EDITOR=$(which nvim)
export P4IGNORE=$HOME/workspaces/$P4_WORKSPACE_DIR/.p4ignore
export P4PORT=$SERVER:$PORT # 5050?
p4o () {
p4o=$(p4 opened | grep "${1:-}" | cut -d '#' -f1 | cut -d '/' -f8-9)
echo "$p4o"
}
--------
Workflow
--------
Don't change file permissions manually in the workspace,
use `p4 edit $FILE`
- p4 sync $FILE(s)
- p4 edit $FILE(s)
- <hack>
- p4 add [-c $CSN] $FILE(s) (only new files)
(Or: p4 change; to specify changset)
- p4 delete [-c $CSN] $FILE(s) (only files to delete)
- p4 move [-c $CSN] $FILE(s) (only files to delete)
- p4 opened [-c $CSN] # confirm files are added correctly
- p4 submit [-c $CSN]
Change lists
------------
- p4 edit -c $CSN $FILE
- p4 submit [-c $CSN]
- p4 submit $FILE
- p4 submit "*".tf
- p4 changes
Commands
------------
- p4 add $FILE(s) # add a file to the depot
- p4 change # change changeset info
- p4 changes [-m count] [-u user]
- p4 client
- p4 client -d $WORKSPACE
- p4 clients -u praco
- p4 describe $CHANGESET # shows changes
- p4 describe $CSN
- p4 diff [file[rev]] # show diff of opened files or revisions
- p4 diff2 files#{7,6} # show diff of 2 files[revisions]
- p4 diff2 file1[rev] file2[rev]. # show diff of 2 files[revisions]
- p4 filelog [files] # show revision history of files
- p4 files file[revRange] # list files in the depot
- p4 have [files] # show which revision you have
- p4 ignores [-v] # show ignored files
- p4 opened # show files opened
- p4 reconcile # show/edit new files for addition to depot
- p4 revert $DIR[/…] # reverts changes [all files with ...]
- p4 set # set variables
- p4 shelve (note changeset no.) # store pending changelist files into depot
- p4 undo # undo submit
- p4 unshelve -s $CSN
tags: perforce, p4