Jump to content


Cloning part of one depot to another via DVCS push

dvcs push

  • Please log in to reply
4 replies to this topic

#1 Jamie Penman-Smithson

Jamie Penman-Smithson

    Member

  • Members
  • PipPip
  • 27 posts
  • LocationUK

Posted 20 January 2016 - 11:52 AM

We are trying to merge part of one depot into another depot, using a combination of p4 fetch and p4 push. Both depots are running 15.2 (P4D/LINUX26X86_64/2015.2/1311674 (2015/12/06)).

Unfortunately, the push to the destination depot isn't working - it complains about locked files in DVCS workspaces:

% p4 login -r hostedclone
Enter password:
User Jamie.Penman logged in.
% p4 -I push -n -r hostedclone
push load revisions 331759 finishing
check files 100% finishing
18213 change(s) containing a total of 331759 file revision(s) were successfully pushed.
This was preview mode; no modifications were made.
% p4 -I push -r hostedclone
push load revisions 331759 finishing
check files 100% finishing
//depot/systems/EITP/1B/SOL_X86/APAS/run/client-cfgs/DERIVS_USER/cfg/Desktop/20120521_INT_TRADER_Phase1a.FWS - locked by Another.User@Another.User-dvcs-1452014579
Cannot import revisions. Not all files could be locked.
%

Looking directly at the depot, this file isn't opened anywhere:

% p4 opened -a //depot/systems/EITP/1B/SOL_X86/APAS/run/client-cfgs/DERIVS_USER/cfg/Desktop/20120521_INT_TRADER_Phase1a.FWS
//depot/systems/EITP/1B/SOL_X86/APAS/run/client-cfgs/DERIVS_USER/cfg/Desktop/20120521_INT_TRADER_Phase1a.FWS - file(s) not opened anywhere.

Looking at the p4 push documentation I noticed this:

Quote

If a push command fails after it has begun transferring files to
the remote server, it will leave those files locked on the remote
server. 'p4 opened' will display '*locked*', and the files cannot
be submitted by any other user. If the push command cannot be
quickly retried, you can use the 'p4 unlock -r' commmand to unlock
the files on the remote server.

So I tried p4 unlock -r, which gives 'no permission to lock'

% p4 -c Another.User-dvcs-1452014579 unlock -r -f
...
//depot/fidessaNet/systems/GTP/STATIC/TOP/run/site-specific/RISK-DLS/2013-09-26/FF_FR_OPFI-RISK_DLS.txt - no permission to lock file
//depot/fidessaNet/systems/GTP/STATIC/TOP/run/site-specific/RISK-DLS/2013-10-21/FF_GB_FOG-RISK_DLS.txt - no permission to lock file
//depot/fidessaNet/systems/GTP/STATIC/TOP/run/site-specific/RISK-DLS/2013-10-23/FF_GB_FOG-RISK_DLS.txt - no permission to lock file
//depot/fidessaNet/systems/TOOLS/MAIN/.site_cshrc - no permission to lock file
//depot/fidessaNet/systems/TOOLS/MAIN/p5 - no permission to lock file
//depot/fidessaNet/systems/TOOLS/MAIN/version.txt - no permission to lock file
...

...even though I've used -f and so have super permissions.

Any ideas on how to unlock any files locked in the other DVCS workspace so the push can progress?

Thanks,
Jamie

#2 P4Shimada

P4Shimada

    Advanced Member

  • Members
  • PipPipPip
  • 831 posts

Posted 20 January 2016 - 11:37 PM

View PostJamie Penman-Smithson, on 20 January 2016 - 11:52 AM, said:

We are trying to merge part of one depot into another depot, using a combination of p4 fetch and p4 push. Both depots are running 15.2 (P4D/LINUX26X86_64/2015.2/1311674 (2015/12/06)).

Unfortunately, the push to the destination depot isn't working - it complains about locked files in DVCS workspaces:

Looking directly at the depot, this file isn't opened anywhere:

% p4 opened -a //depot/systems/EITP/1B/SOL_X86/APAS/run/client-cfgs/DERIVS_USER/cfg/Desktop/20120521_INT_TRADER_Phase1a.FWS
//depot/systems/EITP/1B/SOL_X86/APAS/run/client-cfgs/DERIVS_USER/cfg/Desktop/20120521_INT_TRADER_Phase1a.FWS - file(s) not opened anywhere.

Any ideas on how to unlock any files locked in the other DVCS workspace so the push can progress?

Hi Jamie,

Thanks for the output and versions of the server.  Sorry to hear you are having difficulty. It certainly is odd and looks as if you are receiving inconsistent output if the 'opened -a' command is not showing the file shown in the 'locked by' message.

To better trouble-shoot this issue, please let us know the following:

1] Have you ran the 'p4 opened -a' command from both servers to verify results? Also, please try on each server:

p4 opened -a -u Another.User

   Let us know the results.

2]  Are there any exclusionary protections for the file?
//depot/systems/EITP/1B/SOL_X86/APAS/run/client-cfgs/DERIVS_USER/cfg/Desktop/20120521_INT_TRADER_Phase1a.FWS

You can run the following command to verify:

p4 protects //depot/systems/EITP/1B/SOL_X86/APAS/run/client-cfgs/DERIVS_USER/cfg/Desktop/20120521_INT_TRADER_Phase1a.FWS

3] Have you ran any meta data consistency checks recently? (p4d -r $P4ROOT –xx/-xv)

- P4D "-xx" Flag

http://answers.perfo...rticles/KB/2427

- P4D "-xv" Flag

http://answers.perfo...rticles/KB/2425

#3 Jamie Penman-Smithson

Jamie Penman-Smithson

    Member

  • Members
  • PipPip
  • 27 posts
  • LocationUK

Posted 21 January 2016 - 11:41 AM

View PostP4Shimada, on 20 January 2016 - 11:37 PM, said:

Hi Jamie,

Thanks for the output and versions of the server.  Sorry to hear you are having difficulty. It certainly is odd and looks as if you are receiving inconsistent output if the 'opened -a' command is not showing the file shown in the 'locked by' message.

To better trouble-shoot this issue, please let us know the following:

1] Have you ran the 'p4 opened -a' command from both servers to verify results? Also, please try on each server:

p4 opened -a -u Another.User

   Let us know the results.


I have run:

p4 opened -a //depot/systems/EITP/1B/SOL_X86/APAS/run/client-cfgs/DERIVS_USER/cfg/Desktop/20120521_INT_TRADER_Phase1a.FWS

...on both servers and they both agree that the file is not opened anywhere.

However if I run p4 opened -a -u Another.User I see that file is open for branch (amongst other files which were also being migrated over). This looks like the result of another failed push...

//depot/systems/EITP/1B/SOL_X86/APAS/run/client-cfgs/DERIVS_USER/cfg/Desktop/20120521_INT_TRADER_Phase1a.FWS#1 - branch default change (text) by Another.User@Another.User-dvcs-1452014579 *locked*
//depot/systems/EITP/1B/SOL_X86/APAS/run/client-cfgs/DERIVS_USER/cfg/Site-Specific/ApplicationETP/registry.rgs#1 - branch default change (text) by Another.User@Another.User-dvcs-1452014579 *locked*
//depot/systems/EITP/1B/SOL_X86/APAS/run/client-cfgs/DERIVS_USER/cfg/Site-Specific/ETPPackages/ApplicationITP-Derivs/ApplicationETP.tcl#1 - branch default change (text) by Another.User@Another.User-dvcs-1452014579 *locked*

However if I try and revert them I can't, as the client doesn't really exist:

% p4 -u Another.User -c Another.User-dvcs-1452014579 revert -k //depot/systems/TOOLS/MAIN/.site_cshrc
Client 'Another.User-dvcs-1452014579' unknown - use 'client' command to create it.

Quote

2]  Are there any exclusionary protections for the file?
//depot/systems/EITP/1B/SOL_X86/APAS/run/client-cfgs/DERIVS_USER/cfg/Desktop/20120521_INT_TRADER_Phase1a.FWS

You can run the following command to verify:

p4 protects //depot/systems/EITP/1B/SOL_X86/APAS/run/client-cfgs/DERIVS_USER/cfg/Desktop/20120521_INT_TRADER_Phase1a.FWS

I checked and there are no exclusionary protections.

Quote

3] Have you ran any meta data consistency checks recently? (p4d -r $P4ROOT –xx/-xv)

- P4D "-xx" Flag

http://answers.perfo...rticles/KB/2427

- P4D "-xv" Flag

http://answers.perfo...rticles/KB/2425

Not in the last few months, I'll schedule this for the weekend and let you know the results.

Thanks,
Jamie

#4 P4Shimada

P4Shimada

    Advanced Member

  • Members
  • PipPipPip
  • 831 posts

Posted 21 January 2016 - 08:16 PM

Hi Jamie,

Thanks for the output and for running the requested command. When impersonating a different user to revert a file you need to do the following:

p4 login Another.User

p4 -u Another.User -c Another.User-dvcs-1452014579 -H [i]host[/i] revert -k //depot/systems/EITP/1B/SOL_X86/APAS/run/client-cfgs/DERIVS_USER/cfg/Desktop/20120521_INT_TRADER_Phase1a.FWS

I noticed that your revert command was miss the '-H' host flag. I am not sure if you also logged in as the other user before you ran the command.

Can you also please run the command:

p4 lockstat -c Another.User-dvcs-1452014579

Please try this and let me know your results.


REFERENCES

- Unable to Delete a Workspace or Revert Files
http://answers.perfo...rticles/KB/8285

- p4 submit failure leaving files *locked*
http://answers.perfo...rticles/KB/6309

#5 Jamie Penman-Smithson

Jamie Penman-Smithson

    Member

  • Members
  • PipPip
  • 27 posts
  • LocationUK

Posted 25 January 2016 - 10:30 AM

If I run p4 clients -e <client> it returns nothing, likewise when I try and revert anything:

Client 'Another.User-dvcs-1452014579' unknown - use 'client' command to create it.

p4 lockstat also returns:

Client 'Another.User-dvcs-1452014579' doesn't exist.

Yet p4 opened still reports they are opened under that client name...

I ran p4d -xx/-xv over the weekend and there are some inconsistencies, on both the source and destination depots:

Source depot:

Perforce server error:
db.integed/db.rev inconsistencies found.

Destination depot:

Perforce server error:
db.working/db.have inconsistencies found.
Check db.working/db.rev...
Perforce server error:
db.working/db.rev inconsistencies found.

Thanks,
Jamie





Also tagged with one or more of these keywords: dvcs, push

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users