I'm new to Perforce, need to work in command line, i'm so confused why all the commands on the tutorial websites all write like $
p4 command, but I have to add the port every time when try to trigger that command, for an example, for $
p4 sync, i have to type $
p4 -p myhost:myport sync every time even after I logged in, if i missed the host and port, like if i just typing $
p4 sync, the program will just hang in there... anyone can provide some suggestions?
相关问题
- How to trigger a Jenkins build on a Perforce submi
- Perforce external diff in Eclipse?
- Customizing the output of Perforce RCS keyword exp
- List of checked out files by others in Perforce
- git p4 clone has no files
相关文章
- Perforce fast sync a directory to a clean state
- git-p4 submit fails with “Not a valid object name
- Unable to integrate fully from main branch to feat
- Find a string in Perforce file without syncing
- Value of using Git with ClearCase, AccuRev or Perf
- p4v does not show the complete list of checked out
- Integrating moved files in perforce
- How to fix Perforce error “Can't clobber writa
Type:
From that point on, "myhost:myport" will be used as the P4PORT when you run commands.
If you use multiple workspaces/servers, P4CONFIG files make it easy to have different sets of settings (based on your working directory), but for a single value, "p4 set" is a nice persistent one-shot method.
There are a couple ways to make
myhost:1666
the default. These are, in the order of decreasing precedence:-p myhost:1666
)P4CONFIG
file%P4PORT%
)p4 set P4PORT=myhost:1666
to set it)See the docs here.
In your case, I guess the registry (if on Windows) or the env. var. (if on Linux) is the best option.