Vrin
Vrin

Reputation: 41

In Perforce, how can I check in a file previously checked out on another machine/workspace?

I hope I'm not asking a question that's already been answered, but I can't seem to find one that fits my situation.

Scenario: Using P4V gui (2011 version), with no access to P4 command line, on Windows 7.

The setup: A user creates a workspace in Perforce from Machine A, pointing that workspace to a shared network drive, and checks out a file for editing.

Machine A then dies before the user can check in the file. The user is then assigned Machine B, for which he must create a new workspace (which is also pointed at the same shared network drive).

The problem: The problem we're having is that even though the workspace from the dead Machine A and from the new Machine B both point to the same location, Perforce considers them to be different workspaces and prevents the user from checking in/submitting the previously checked out file.

Any suggestions on how to check in this stranded file would be greatly appreciated. Thank you very much!

Upvotes: 4

Views: 4210

Answers (2)

P4Shimada
P4Shimada

Reputation: 803

Have you tried clearing out the Host field? For example, see 'Using the same workspace from different machines':

http://www.perforce.com/perforce/doc.current/manuals/p4guide/chapter.configuration.html#d0e1720

As an update from my comment response, if you need to change ownership of a changelist, the steps are documented here:

http://answers.perforce.com/articles/KB_Article/Changing-the-Owner-of-a-Pending-Changelist

Upvotes: 0

Mark
Mark

Reputation: 3700

To be nice and clean, I'd suggest this:

  1. Make a backup copy of the file as it exists on the shared network drive.
  2. Connect to the depot from Workspace A (can be done from Machine B if the workspace isn't bound to Machine A).
  3. Revert the file - this will overwrite the file on the drive with the version in the depot (aren't you glad you made a copy first?).
  4. Switch to Workspace B.
  5. Check out the file.
  6. Copy the backup version over the file on the shared network drive.
  7. Check in the file.

...and if you're not planning on using Workspace A anymore, I'd suggest deleting it.

Upvotes: 0

Related Questions