Jump to content


Make all check in/out of the same user, me


  • Please log in to reply
12 replies to this topic

#1 Bhavbhuti

Bhavbhuti

    Member

  • Members
  • PipPip
  • 15 posts
  • LocationRajkot, Gujarat

Posted 12 August 2020 - 01:15 PM

Hi all

I am a single user using Perforce.  I am not an advanced user nor have I needed to use any advanced features before, just simple check in and check out.

I recently switched computers and I had to take my depot from one to another.  That is all well in a way.

Now I had a couple of files open before this move.  After the move to the new computer, I try to open the same files again via SCCPlugIn (I use Perforce via VFP Project Manager), it will not check out the file, stating that the files are already open by another user.  Well I am the only user.

So my question is how can I get everything aligned to one, present user?  Is there an SQL like command that I can simply execute to get to the present user?

Please advise and pardon my ignorance

Kind regards
Bhavbhuti

#2 Sambwise

Sambwise

    Advanced Member

  • Members
  • PipPipPip
  • 1192 posts

Posted 12 August 2020 - 02:39 PM

Can you explain more about how you moved to the new computer?

Did you move your workspace as well as the server?  Is your username the same on the new computer as it was on the old one?

#3 Bhavbhuti

Bhavbhuti

    Member

  • Members
  • PipPip
  • 15 posts
  • LocationRajkot, Gujarat

Posted 12 August 2020 - 03:12 PM

Thanks for you reply Sambwise.

I just copied over the depot and installed the programs. My Windows user name is still the same "Bhavbhuti" but my older PC was named "DEVE1" and this laptop is named "Bhav".  The configuration I have set is same as before when installing (I had old screen shots from the last install to follow) and there is a batchfile that I use the following command and config

"D:\Program Files (x86)\Perforce\p4.exe" set P4CONFIG="D:\PerforceDepot\VSOP4Config"

P4CLIENT=Bhavbhuti
P4USER=Administrator
P4PORT=1666
P4ROOT="D:\PerforceDepot"

Please advise

#4 Sambwise

Sambwise

    Advanced Member

  • Members
  • PipPipPip
  • 1192 posts

Posted 12 August 2020 - 03:51 PM

So you set your user name to "Administrator" and your workspace name to "Bhavbuti" -- this is a little confusing but as long as you use the same names consistently it doesn't really matter what they are.  :)  Could you go to the command line and run "p4 edit <file>" on the file that you were trying to check out in SCC and paste the result you get back?

#5 Bhavbhuti

Bhavbhuti

    Member

  • Members
  • PipPip
  • 15 posts
  • LocationRajkot, Gujarat

Posted 13 August 2020 - 07:09 AM

That is the old PC name "DEVE1" where I had checked it out previously.  Now my laptop is named "Bhav"

Trivia: UN Administrator is from one of my older PCs when WinNT allowed Administrator as a user, since then an administrator as UN is not an option, so I just continued using this as before

Please advise

Kind regards
Bhavbhuti


Please advise

#6 Bhavbhuti

Bhavbhuti

    Member

  • Members
  • PipPip
  • 15 posts
  • LocationRajkot, Gujarat

Posted 13 August 2020 - 07:10 AM

I had pasted an image thought it would save but guess not allowed, so I am pasting the command and result as text

D:\VSO3\Projects\C43\Libs>p4 edit aapp.vcx
Client 'Bhavbhuti' can only be used from host 'DEVE1'.

#7 Bhavbhuti

Bhavbhuti

    Member

  • Members
  • PipPip
  • 15 posts
  • LocationRajkot, Gujarat

Posted 13 August 2020 - 07:46 AM

Also, if there is one (few) command(s) that would allow me to align all my past (multiple PCs) inline into on User, Workspace, Depot, etc. I all for it, because it will allow me to continue using it with parameters that are most appropriately named

Thanks and regards
Bhavbhuti

#8 Sambwise

Sambwise

    Advanced Member

  • Members
  • PipPipPip
  • 1192 posts

Posted 13 August 2020 - 04:54 PM

Run "p4 client" and change the "Host" field from "DEVE1" to "Bhav".  That will tell Perforce that your workspace (which used to live on DEVE1) now lives on a client host called "Bhav".

#9 Bhavbhuti

Bhavbhuti

    Member

  • Members
  • PipPip
  • 15 posts
  • LocationRajkot, Gujarat

Posted 13 August 2020 - 05:40 PM

#  Host:     If set, restricts access to the named host.

Thanks for that, I will change it soon.  Before I do so, I noticed this following comment.  Is it possible to make them all the same, empty?  No restrictions?

Also can I consolidate, all my Administrator and Bhavbhuti records into one?  Default
#  Owner:    The Perforce user name of the user who owns the client
#    workspace. The default is the user who created the
#    client workspace.

I am all into using default, not that I am planning to switch any PC/Laptops but whenever I need to I can easily switch without relying on Windows dictating what my system username etc is.  I just want to make all past and present records belong to the same username, client, workspace, owner, host, so on

Appreciating your ongoing help

Bhavbhuti

#10 Sambwise

Sambwise

    Advanced Member

  • Members
  • PipPipPip
  • 1192 posts

Posted 13 August 2020 - 11:36 PM

You can clear the Host field, but I don't generally recommend doing that because your workspace will end up in an inconsistent state if you use it from multiple hosts simultaneously.  Setting a Host field helps enforce that you only use it from one host at a time -- it's fine to move a workspace from one host to another (at which point you update the Host field to reflect the move), but then you have to consistently use it from the new one from that point on.

Another option is to just set a P4HOST value that follows you from machine to machine.  (I used to do this when I had a whole bunch of workspaces that I'd migrate when I got a new machine -- it was easier to just set my P4HOST to the name of the old machine than to update 20 client specs).

Quote

Also can I consolidate, all my Administrator and Bhavbhuti records into one?

That's pretty much up to you -- if you consistently use the same username everywhere (as defined by your P4USER setting), then you'll only have one username.  It's as simple as that.  If you don't set P4USER, then it defaults to your login name on the local OS.

#11 Bhavbhuti

Bhavbhuti

    Member

  • Members
  • PipPip
  • 15 posts
  • LocationRajkot, Gujarat

Posted 14 August 2020 - 08:12 AM

Thanks that worked.  I switched to HOST Bhav and found my checked out files and reverted them.  It just needed to be reverted and I think I have a handle of things.  Though I must say I switched the HOST back to DEVE1 as that was always that way.

Should I be able to add P4HOST=DEVE1 to the config file that I have for easy setting purposes?
P4CLIENT=Bhavbhuti
P4USER=Administrator
P4PORT=1666
P4ROOT="D:\PerforceDepot"

If so that would also remove the remaining variable.  Please advise

#12 Sambwise

Sambwise

    Advanced Member

  • Members
  • PipPipPip
  • 1192 posts

Posted 14 August 2020 - 02:47 PM

Yes, setting P4HOST in the config file would be a way to ensure that everywhere that config file goes, the environment looks the same.

#13 Bhavbhuti

Bhavbhuti

    Member

  • Members
  • PipPip
  • 15 posts
  • LocationRajkot, Gujarat

Posted 15 August 2020 - 11:02 AM

Done.  Thanks for all your help Sambwise

Kind regards
Bhav




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users