Title: ???? ?? Perforce ??
1???? ?? Perforce ??
2Perforcec ? ??
- Client/Server (over network)
- ?? ?? ??
- ???? ??
- ???? ???
- ?? ??? ??
- ???!
3? ? The Perforce Client-Server Model
Perforce client
Perforce server
Perforce client
Perforce client
Perforce client
4? ?The Perforce Server
Perforce server
5? ?Perforce Client Programs
6?? ?? ???Changelists
Changelist 3567
src/zoo/zebra.c23 edit
src/zoo/chimp.c1 add
src/zoo/walrus.c14 edit
src/zoo/lion.c3 delete
src/zoo/hippo.c9 edit
7Client ???? ??
Editor form
Command
Client laura-ws1 Date 1998/06/15
123947 Owner laura Description
Lauras first client workspace. Root
c\demo Options nomodtime noclobber View
//depot/main/jam/... //laura-ws1/main/jam/...
8???? ??
- p4 sync
- //depot/main/jam/regexp.c4 - added as
c\demo\main\jam\regexp.c - //depot/main/jam/regexp.h2 - added as
c\demo\main\jam\regexp.h - //depot/main/jam/RELNOTES77 - added as
c\demo\main\jam\RELNOTES - //depot/main/jam/rules.c5 - added as
c\demo\main\jam\rules.c - and so on...
9?? ??? ??
- cd c\demo\main\jam
- p4 edit rules.c regexp.h
- //depot/main/jam/rules.c5 - opened for edit
- //depot/main/jam/regexp.h2 - opened for edit
- vi rules.c
- vi regexp.h
10?? ??? ??
- vi alias.c
- p4 add alias.c
- //depot/main/jam/alias.c1 - opened for add
- p4 add -t binary logo.bmp
- //depot/main/graphics/logo.bmp1 - opened for add
11??? ??
- ls
- lists.c mkjambase.c parse.h variable.c
- lists.h mkjambase.h rules.h variable.h
- make.c newstr.c scan.c yyacc
- make.h newstr.h scan.h
- make1.c option.c search.c
- p4 delete rules.h parse.h
- //depot/main/jam/rules.h3 - opened for delete
- //depot/main/jam/parse.h9 - opened for delete
12?? ??? ??
- p4 revert regexp.h alias.c parse.h
- //depot/main/jam/regexp.h2 - was edit, reverted
- //depot/main/jam/alias.c1 - was add, abandoned
- //depot/main/jam/parse.h9 - was delete, reverted
13???? ??? ?? ?? ??
- p4 opened
- //depot/main/jam/hash.c2 - edit default change
(text) - //depot/main/jam/check.c1 - add default change
(text) - //depot/main/jam/execnt.c9 - delete default
change (text)
14???? ??
- p4 diff hash.c
- //depot/main/jam/hash.c2 -
c\demo\main\hash.c - 76c76
- lt TARGET target, t target
- ---
- gt TARGET target, t target
15???? ??????? ??
16????? ??
Change 5085 created with 3 open
file(s). Submitting change 5085. add
//depot/main/jam/check.c1 delete
//depot/main/jam/execmac.c2 edit
//depot/main/jam/rules.c6 Change 5085
submitted.
Change new Description ltenter description
heregt Files //depot/main/jam/check.c
add //depot/main/jam/execmac.c delete
//depot/main/jam/rules.c edit
Added check function.
17?? ??About resolve
- The resolve command
- When to use resolve
- After a failed submit
- After re-syncing opened files
- When integrating between branches
18?? ??
19?? ???
c\demo\main\jam\rules.c - merging
//depot/main/jam/rules.c7 Diff chunks 0
yours 0 theirs 0 both 1 conflicting Accept(a
) Edit(e) Diff(d) Merge (m) Skip(s) Help(?)
e
20?? ??Conflict markers in the merged file
theirs
yours
include "jam.h" include "option.h" include
"patchlev.h" include "make.h"
include "jam.h" include "option.h" include
"patchlevel.h" include "make.h"
merged
result (after editing)
include "jam.h" include "option.h" ifdef
FATFS include "patchlev.h" else include
"patchlevel.h" endif include "make.h"
include "jam.h" include "option.h" gtgtgtgt
ORIGINAL foo.c3 THEIRS foo.c4 include
"patchlev.h" YOURS include
"patchlevel.h" ltltltlt include "make.h"
21Inter-File Branching
- Branching a codeline
- Propagating changes from one codeline branch into
another
22??? ? ??Branching a Codeline
23??? ? ?????? ?? ?? ??
24?? ??? ? ?? Client ??
Client jim-ws Description Jims Release
1.0 workspace. Root c\demo View
//depot/main/... //jim-ws/main/...
//depot/rel1/... //jim-ws/rel1/...
Is the target branch in this list?
25? ??? ??
- p4 integ //depot/main/... //depot/rel1/...
- //depot/rel1/regexp.h1 - branch/sync from
//depot/main/regexp.h3 - //depot/rel1/rules.c1 - branch/sync from
//depot/main/rules.c7 - //depot/rel1/rules.h1 - branch/sync from
//depot/main/rules.h4 - and so on
- p4 submit
- ...
26integrate //depot/rel1/... //depot/main/...
27??? ? ?? ?? ??
- p4 sync //depot/main/...
- //depot/main/... - files up-to-date.
- p4 integ //depot/rel1/... //depot/main/...
- //depot/main/make.c4 - integrate from
//depot/rel1/make.c2,3 - //depot/main/make1.c7 - integrate from
//depot/rel1/make1.c2 - p4 resolve
- ...
- p4 submit
- ...
28??? ? ??Integrating by Branch View
- A way to store and reuse source/target branch
relationships - To use branch views
- create branch view spec
- use branch view name with integrate command
29??? ? ?? ??
branch view name
Branch r1 Description Release 1
branch for Server API View
//depot/main/svr/... //depot/rel1/svr/...
//depot/main/api/... //depot/rel1/api/...
target paths
source paths
30??? ?? ??
- p4 integ -b r1
- instead of
- p4 integ //depot/main/svr/ //depot/rel1/svr/
- p4 integ //depot/main/api/ //depot/rel1/api/
- And
- p4 integ -r -b r1
- instead of
- p4 integ //depot/rel1/svr/ //depot/main/svr/
- p4 integ //depot/rel1/api/ //depot/main/api/
31Multi-platform Support
- Runs on zillions of platforms!
- If we don't run on yours, let us know and we'll
port it!
32Summary
- Fast
- Scalable
- Intuitive
- Highly portable
- Low administration
- Excellent technical support
33Code Manager (1)
- Based on SCCS
- Good 3-way GUI merge utility
- Remote working directly supported
- Work on real content, not virtual copies
34Code Manager (2)
- Bringover and putback operations lock master
workspace - Operations are performed on individual files
(including labels!) - Getting history is difficult
- Can't delete files
- Only runs on Sun Operating Systems
- SLOW!