p4 command reference - perforce · pdf filecommands 25 p4add 26 p4admin 30 p4aliases 33...

664
P4 Command Reference 2018.1 March 2018

Upload: doanque

Post on 06-Feb-2018

235 views

Category:

Documents


4 download

TRANSCRIPT

  • P4 Command Reference2018.1

    March 2018

  • Copyright 1999-2018 Perforce Software.

    All rights reserved.

    Perforce Software and documentation is available fromwww.perforce.com. You can download and use Perforce programs, butyou can not sell or redistribute them. You can download, print, copy, edit, and redistribute the documentation, but you can not sellit, or sell anydocumentation derived from it. You can not modify or attempt to reverse engineer the programs.

    This product is subject to U.S. export control lawsand regulations including, but not limited to, the U.S. Export AdministrationRegulations, the International Traffic in ArmsRegulation requirements, and all applicable end-use, end-user and destinationrestrictions. Licensee shall not permit, directly or indirectly, use of anyPerforce technology in or byanyU.S. embargoed country orotherwise in violation of anyU.S. export control lawsand regulations.

    Perforce programsand documents are available from our Web site as is. No warranty or support is provided.Warranties andsupport, along with higher capacity servers, are sold byPerforce Software.

    Perforce Software assumesno responsibility or liability for anyerrors or inaccuracies that might appear in this book. Bydownloading and using our programsand documents you agree to these terms.

    Perforce and Inter-File Branching are trademarksof Perforce Software.

    All other brandsor product namesare trademarksor registered trademarksof their respective companiesor organizations.

    Anyadditional software included within Perforce Software is listed in "License Statements" on page664.

    https://www.perforce.com/

  • Contents

    How to use this Guide 13Feedback 13

    Other documentation 13

    Syntax conventions 13

    Whats new in this guide 142018.1 release 14

    2017.2 release 16

    New specification fields 16New commands 16New configurables 16Updated configurable 16

    Technical Preview 17Second Factor Authentication 17

    Graph Depot 17

    Commands by functional area 18Graph depot commands 20Exclusive to graph depots 20

    Behave differently for graph depots 20

    Tech Preview 2017.2 for graph depots 21

    Command-line Help for graph depots 22

    Introduction 23Getting help 23

    Command aliases 24

    Defining aliases 24Command alias syntax 25Basic examples 27Complex examples 28Putting it all together 30Previewing alias substitutions 31Advanced topics 31Limitations 32

    Naming conventions 32

    Creating scripts 33

    3

  • Commands andmetadata 33

    Commands 35p4 add 36

    p4 admin 40

    p4 aliases 44

    p4 annotate 46

    p4 archive 49

    p4 attribute 51

    p4 bgtask 52

    p4 branch 55

    p4 branches 58

    p4 cachepurge 60

    p4 change 62

    p4 changelist 68

    p4 changelists 69

    p4 changes 70

    p4 clean 73

    p4 client 75

    p4 clients 89

    p4 clone 91

    p4 configure 93

    p4 copy 97

    p4 counter 100

    p4 counters 103

    p4 cstat 105

    p4 dbschema 106

    p4 dbstat 107

    p4 dbverify 109

    p4 delete 111

    p4 depot 114

    p4 depots 122

    p4 describe 124

    Examples 126

    4

  • p4 diff 128

    p4 diff2 132

    p4 dirs 136

    p4 diskspace 138

    p4 edit 140

    p4 export 143

    p4 fetch 146

    p4 filelog 151

    p4 files 155

    p4 fix 158

    p4 fixes 161

    p4 flush 163

    p4 fstat 166

    p4 graph tags 175

    p4 graph show-ref 176

    p4 grant-permission 177

    p4 grep 181

    p4 group 183

    p4 groups 188

    p4 have 190

    p4 help 194

    p4 ignores 196

    p4 info 199

    p4 init 201

    p4 integrate 203

    p4 integrated 209

    p4 interchanges 213

    p4 istat 215

    p4 job 217

    p4 jobs 220

    p4 jobspec 226

    p4 journalcopy 230

    p4 journaldbchecksums 233

    5

  • p4 journals 236

    p4 key 240

    p4 keys 243

    p4 label 244

    p4 labels 248

    p4 labelsync 250

    p4 ldap 252

    p4 ldaps 259

    p4 ldapsync 262

    p4 license 266

    p4 list 268

    p4 lock 270

    p4 lockstat 272

    p4 logappend 274

    Example 274p4 logger 276

    p4 login 278

    p4 login2 280

    p4 logout 282

    p4 logparse 284

    p4 logrotate 286

    p4 logschema 287

    p4 logstat 288

    p4 logtail 290

    p4merge 292

    p4monitor 295

    p4move 301

    p4 obliterate 303

    p4 opened 306

    p4 passwd 309

    p4 ping 312

    p4 populate 314

    p4 print 316

    6

  • p4 property 318

    p4 protect 320

    p4 protects 334

    p4 proxy 336

    p4 prune 337

    p4 pubkey 339

    p4 pubkeys 342

    p4 pull 344

    p4 push 350

    p4 reconcile 354

    p4 reload 357

    p4 remote 359

    p4 remotes 362

    p4 rename 364

    p4 renameuser 365

    p4 reopen 368

    p4 replicate 370

    p4 repo 372

    p4 repos 375

    p4 reshelve 377

    p4 resolve 379

    Examples 386p4 resolved 387

    p4 restore 389

    p4 resubmit 391

    p4 revert 394

    p4 review 398

    p4 reviews 400

    p4 revoke-permission 402

    p4 server 405

    p4 serverid 412

    p4 servers 414

    p4 set 420

    7

  • p4 shelve 423

    p4 show-permission 427

    p4 show-permissions 428

    p4 sizes 430

    p4 status 433

    p4 stream 436

    p4 streams 446

    p4 submit 448

    p4 switch 458

    p4 sync 462

    p4 tag 470

    p4 tickets 472

    Usage Notes 472p4 triggers 473

    p4 trust 475

    p4 typemap 477

    p4 undo 481

    p4 unload 483

    p4 unlock 486

    p4 unshelve 488

    p4 unsubmit 490

    p4 unzip 492

    p4 update 495

    p4 user 496

    p4 users 502

    p4 verify 504

    p4 where 508

    p4 workspace 510

    p4 workspaces 511

    p4 zip 512

    Environment and Registry Variables 514P4ALIASES 515

    Usage Notes 516

    8

  • Examples 516P4AUDIT 517

    P4AUTH 518

    Usage Notes 518Value if not Explicitly Set 518Examples 518Notes 518

    P4BROKEROPTIONS 519

    P4CHANGE 520

    P4CHARSET 521

    P4_port_CHARSET 523

    P4CLIENT 524

    P4CLIENTPATH 525

    P4COMMANDCHARSET 526

    P4CONFIG 527

    P4DEBUG 529

    P4DESCRIPTION 530

    P4DIFF 531

    P4DIFFUNICODE 532

    P4EDITOR 533

    P4ENVIRO 534

    P4HOST 536

    P4IGNORE 537

    P4JOURNAL 540

    P4LANGUAGE 541

    P4LOG 542

    P4LOGINSSO 543

    P4MERGE 545

    P4MERGEUNICODE 547

    P4NAME 548

    P4PAGER 549

    P4PASSWD 550

    P4PCACHE 551

    P4PFSIZE 552

    9

  • P4POPTIONS 553

    P4PORT 554

    P4ROOT 557

    P4SSLDIR 558

    P4TARGET 560

    P4TICKETS 561

    P4TRUST 562

    P4USER 563

    PWD 564

    TMP, TEMP 565

    Global Options 566File Specifications 570Views 577Usage Notes 577

    File Types 581Base filetypes 581

    File typemodifiers 583

    Perforce file types for common file extensions 585

    Keyword Expansion 586

    Usage Notes 586

    Configurables 589Configurables that affect the server 589

    Configurables that affect the client 589

    Configurables that affect the proxy 590

    Configurables - alphabetical list 590

    Index 591A 594C 598D 598F 605J 609L 610M 613N 616

    10

  • P 626R 627S 634T 644Z 645

    Glossary 646License Statements 664

    11

  • How to use this GuideThis reference includes every Helix Server command, environment variable, and configurable, andassumes knowledge of the concepts in Solutions Overview: Helix Version Control System.

    FeedbackHow can we improve this manual? Email us at [email protected].

    Other documentationSee https://www.perforce.com/support/self-service-resources/documentation.

    Syntax conventionsHelix documentation uses the following syntax conventions to describe command line syntax.

    Notation Meaningliteral Must be used in the command exactly as shown.

    italics A parameter for which youmust supply specific information. For example, fora serverid parameter, supply the ID of the server.

    [-f] The enclosed elements are optional. Omit the brackets when you composethe command.

    ... n Repeats as much as needed:l alias-name[[$(arg1)...[$(argn)]]=transformation

    n Recursive for all directory levels:

    l clone perforce:1666 //depot/main/p4...~/local-repos/main

    l p4 repos -e //gra.../rep...

    element1 |element2

    Either element1 or element2 is required.

    13

    https://www.perforce.com/perforce/doc.current/manuals/overview/mailto:[email protected]://www.perforce.com/support/self-service-resources/documentation

  • Whats new in this guide

    Whats new in this guideThis section provides a summary with links to topics in this reference. For a complete list of what's newin this release, see theRelease Notes.

    2018.1 release

    Area Feature

    graph depot n For a graph depot, "p4 describe" on page124 can use the "classic" syntax,or using the SHA1, can provide a commit description. See thep4description "Examples" on page126.

    n "p4 filelog" on page151

    n "p4 fstat" on page166

    n "p4 print" on page316

    n "p4 revert" on page394

    n "p4 show-permissions" on page428

    n "p4 graph show-ref" on page176

    n "p4 graph tags" on page175

    n triggers related to graph depots: see theWhat's New in the HelixVersioning Engine Administrator Guide:Fundamentals.

    n Support for Git Large File Storage (LFS).A replica can sync LFS files from graph depots.See the File Types chapter on "File typemodifiers" on page583,specifically the+Fmodifier.

    14

    http://www.perforce.com/perforce/doc.current/user/relnotes.txt

  • 2018.1 release

    "Configurables- alphabeticallist" onpage590

    n "