Reopen and revert files in perforce.

rajeshkumar created the topic: Reopen and revert files in perforce.
If the perforce user access has been removed/blocked from user table and they have so many files opened. There could be two ways to to revert the files.

Problem:
p4 -p server:port -u username -c clientname -H hostname revert //…
Access for user ‘username ‘ has not been enabled by ‘p4 protect’.
p4 -p server:port -u username1 -c clientname -H hostname revert -k //… ( tried using differernt user ‘username’)
//depot/rajesh/file1.txt#none – belongs to user username, not reverted

Solution 1:
So I found one solution for it
another user could take ownership of the files. Here’s an example:
Users ‘rajesh’ and ‘kumar’ have each opened a file in workspace ‘temporary’.
>p4 opened -a //depot/test…
//depot/test.js#3 – edit default change (xtext) by rajesh@temporary
//depot/test2.js#2 – edit default change (text) by kumar@temporary

I use the ‘reopen’ command to change the user:
>p4 -u kumar -c temporary reopen //depot/test…
//depot/test.js#3 – reopened; user kumar
//depot/test2.js#2 – reopened; user kumar

As these changes are now ‘mine’, I can revert them (noting the ‘-k’ flag here):
>p4 -u kumar -c temporary revert -k //depot/test…
//depot/test.js#3 – was edit, cleared
//depot/test2.js#2 – was edit, cleared

Solution 2: Add the missing user for temporary and follow the steps as in problem statement
Regards,
Rajesh Kumar
Twitt me @ twitter.com/RajeshKumarIn

rajeshkumar replied the topic: Re: Reopen and revert files in perforce.
Problem

Error message when you try to delete the clientspec of users
Client ‘rajesh-test-client’ has files shelved; use ‘shelve -df’ to remove them, and then try again.

Solution:

Some times you may not able to delete client spec and user due to many reason. if user has opened few files in another users clientspec. please follow the steps as given

p4 -p server:port -u username users | grep username
p4 -p server:port -u username clients | grep username
p4 -p server:port -u username client -f -d clientname
p4 -p server:port -u username user -d -f username
p4 -p server:port -u username opened -C clientname //…
p4 -p server:port -u username client clientname
p4 -p server:port -u username describe 662626
p4 -p server:port -u username protect -o | grep jfung
p4 -p server:port -u username protect
p4 -p server:port -u username login jfung
p4 -p server:port -u username -c clientname -H localhost.localdomain revert -k //…
p4 -p server:port -u username clients | grep username
p4 -p server:port -u username opened -u username //…
p4 -p server:port -u username client -d -f clientanam
p4 -p server:port -u username user -d -f username
Regards,
Rajesh Kumar
Twitt me @ twitter.com/RajeshKumarIn

rajeshkumar replied the topic: Re: Reopen and revert files in perforce.
Problem: One more very interesting scenario where there is no files pending but few files shelved in pending change list.

Answer:
p4 -p server:port -u username client -d -f worksapce_name
Client ‘worksapce_name’ has files shelved; use ‘shelve -df’ to remove them, and then try again.

p4 -p server:port -u username opened -a //… | grep worksapce_name
NONE

p4 -p server:port -c clientname changes -s pending -c workspace_name //…
Change 217927 on 2011/07/13 by username@workspace_name *pending* ‘ twitter.com/RajeshKumarIn

rajeshkumar replied the topic: Re: Reopen and revert files in perforce.
How to reverts file opened by Perforce user?
To Revert these changes –
This will list down the files and client’s name where the file has been opened.
p4 -p Server:port -u rajesh opened –a | grep other_user

Now get the host name of the client,
p4 -p Server:port -u rajesh client -o admin-ols-dump | grep –i host

Login as user from super user account.
p4 -p Server:port -u rajesh login other_user

Frame the commands and run it in the given fashion.
p4 -p Server:port -u other_user -c -h revert -k //depot/releases/filename.txt
Regards,
Rajesh Kumar
Twitt me @ twitter.com/RajeshKumarIn

Tagged :
0 0 votes
Article Rating
Subscribe
Notify of
guest

0 Comments
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x