Re: [p4] P4HOST issues
Matt Janulewicz <[email protected]> Tue, 27 Mar 2018 11:20:01 -0700
| Newsgroups | gmane.comp.version-control.perforce |
|---|---|
| Message-ID | <[email protected]> |
Posted on behalf of forum user 'Matt Janulewicz'. +infinity for what Sam says about the Host: value in your workspace. You almost never want to change that or blank it out, but one other instance that you might want to do that is if you're on a VPN that doesn't handle hostnames right (all of them) and you find your localhost value changes every time you connect. You do not want to use the same workspace from different PC's/Macs, and you don't want to connect to a different server from the same workspace, either. If I'm reading the OP correctly, this might be a situation where you want to connect to two different servers (perhaps one local and one remote) from the same PC/Mac, but don't want to manually change the P4HOST (or P4PORT or ...) each time. If that's not the case, I'm going to explain how to do it anyway because it's immensely useful for admins. :) Use P4CONFIG. Set that variable to a filename (most people chose something like .p4config, I like to see it front and center so I set mine to P4CONFIG.) Then in the root of each of your workspaces, create that file with your custom settings. Wherever you're set on the commandline, p4 will kind of look upward through it's path until it encounters a P4CONFIG file and will use those setting. Typically mine only have P4PORT, P4CLIENT and P4USER set. I'd say that any time you're connecting to different servers from the same PC/Mac, both P4PORT and P4CLIENT will have to be unique, or you'll be in a world of hurt, as Sam outlined. We have five edge servers and a commit, and I routinely switch between them (and their corresponding workspaces) simply by changing into a different directory. Hope that helps. If not you, someone else that comes across this thread! -- Please click here to see the post in its original format: http://forums.perforce.com/index.php?/topic/5668-p4host-issues _______________________________________________ perforce-user mailing list - [email protected] http://maillist.perforce.com/mailman/listinfo/perforce-user