Showing posts with label Perforce. Show all posts
Showing posts with label Perforce. Show all posts

Dec 13, 2013

How to reset passwords in perforce

From time to time, it is inevitable that users will forget Perforce passwords. A Perforce superuser can set a new password for any user with:

    Release 99.1 and later:

        p4 passwd username

    (Perforce will prompt the superuser for a new password for user username.)

C:\Users\mohan>p4 passwd thangam
Enter new password:
Re-enter new password:
Password updated.

How to delete the changelist and workspace of another user ( clean ex-employee workspace to reclaim space and license )


this will give you the pending changes on the client

p4 changes -c user_workspace

this will delete the pending change list of your choice

p4 change -d

after that, you can delete the client using

p4 client -d user_workspace

How to fix perforce error 'Some file(s) could not be transferred from client.'

Problem:
open for read: c:\p4\client_spec.txt: The system cannot find the file specified.
Submit aborted -- fix problems then use 'p4 submit -c 1347493'.
Some file(s) could not be transferred from client.

Cause:
When you try to open a file which does not exist in perforce, it gives above error. First do a p4 add, and then open it.

Execution Failed: "/bin/vi" ".\t1636t37.tmp": The system cannot find the path specified.

Problem:
Execution Failed: "/bin/vi" ".\t1636t37.tmp": The system cannot find the path specified.

Cause:
you are trying to do a p4 edit in cgywin, where p4 is pointing to the windows version  c:\program files\p4.exe so its trying to open textfile in vi using windows p4.exe. Change the default p4  pointing to the cygwinversion and try.

How to check whats running in the perforce server or How to monitor perforce server

Like the 'top' command in Linux which helps us to see what process and commands are running in the system, perforce has 'monitor' command to list the operations running in its system.

It lists the users and their commands currently running in the perforce server

Example -

mohan@vmlinux/cygdrive/c/p4_mohan/user_informatio
5.0/output
# p4 monitor show
 7097 R mohan    00:00:00 monitor
 7098 R rama       00:00:00 labels
 7099 R arus    00:00:00 spec
28435 R perforce   00:30:31 verify

Could not connect to perforce. error 'It is possible that someone is intercepting your connection to the Perforce P4PORT '10.31.64.101:1888''

Error Message:

[mohan@spl ~]$ p4 info
******* WARNING P4PORT IDENTIFICATION HAS CHANGED! *******
It is possible that someone is intercepting your connection
to the Perforce P4PORT '10.11.64.101:1888'
If this is not a scheduled key change, then you should contact
your Perforce administrator.
The fingerprint for the mismatched key sent to your client is8A:BE:F1:B9:DC:E3:50:D1:16:D6:6D:66:BB:AE:0B:26:86:C0:60:DC
To allow connection use the 'p4 trust' command.


Reason:
This happens due to environmental changes like change of ip or mac address etc. It makes the established and stored fingerprint to mismatch. So you have to reestablish the 'trust' with the server again. so we will not be able to run any command.

You have to do this by issuing 'p4 trust -f'

[build@splash ~]$ p4 trust -f
******* WARNING P4PORT IDENTIFICATION HAS CHANGED! *******
It is possible that someone is intercepting your connection
to the Perforce P4PORT '10.11.64.101:1888'
If this is not a scheduled key change, then you should contact
your Perforce administrator.
The fingerprint for the mismatched key sent to your client is8A:BE:F1:B9:DC:E3:50:D1:16:D6:6D:66:BB:AE:0B:26:86:C0:60:DC
Are you sure you want to establish trust (yes/no)? yes
Added trust for P4PORT 'ssl:p4pserver.cmp.com:1888' (10.11.64.101:1888)


Now you can try some p4 commands to verify.

how can I find out the "source" changelist of the newly created branch in perforce?

To see details on source of branch integrated in perforce

After branching from base branch to a new branch, can we find the changelist at which the branch is created from source branch?

You can find it by using the below command with the new branch ( the child branch for whom you are interested to see the history)

p4 changes -i  //depot/child_branch


This will list  the  changes of this branch followed by the changes happened in its parent branch. By describing the changes you can get the particular parent branch name.

Syntax for p4 describe

p4 describe <changelist number>

example-
$ p4 describe 1129671
Change 7129671 by ravis1@project on 2010/06/29 06:51:50

        starting tomcat using "start startup.bat" command

Affected files ...

... //dev/env/atia/eventrepository/install/install.bat#11 edit
... //dev/env/atia/eventrepository/readme.txt#6 edit

Nov 30, 2013

How to fix Perforce error "Can't clobber writable file"

Perforce throwing below error while trying to remove folder from workspace

Error:
 Can't clobber writable file C:\thiagu\Perforce\thiagu_p4server.net_1333\dev-app\Application.Properties

Solution:
when you try to sync a file, perforce expects your files in workspace will have read-only permissions. But if a file is not checkout,(by p4 edit)but has write permission then it will throw the above error. Changing the file to read-only and syncing again will solve the issue. or try removing the workspace and get the latest revision again

Jul 29, 2013

WSAECONNREFUSED (10061) - Connection refused.

Problem:
Connect to server failed; check $P4PORT.
connect: 10.31.64.101:1888: WSAECONNREFUSED

Cause & Solution: 

This problem occurs when you are trying to connect to a server which is not running. May be the network in-between lost, or perforce must  be down due to some reason etc.

check whether the port is running  and  restart perforce server if needed

[root@p4proxyserver4 ~]# netstat -na | grep 1444
tcp        0      0 10.27.60.103:1444           0.0.0.0:*                   LISTEN


In my case it happened that the proxy server which i was trying to connect, could not connect to the main server  which is recently restarted.  So once i restarted the proxy server, i was able to connect to the proxy perforce server fine.

For detailed and related information refer below URL
http://answers.perforce.com/articles/KB_Article/Common-Windows-Server-Network-Errors

Mar 1, 2013

How to change password in perforce

You can change your password in perforce using p4 cmd 'passwd'. This is same in windows\Linux. Example given below.


C:\Users\mohan>p4 passwd
Enter old password:
Enter new password:
Re-enter new password:
Password updated.

Feb 20, 2013

Different options of reverting files in Perforce


p4 revert //...
Revert every file you have open, in every one of your pending changelists, to its pre-opened state.

p4 revert -c default //...
Revert every file open in the default changelist to its pre-opened state.

p4 revert -n *.txt
Preview a reversion of all open .txt files in the current directory, but don't actually perform the revert.

p4 revert -c 31 *.txt
Revert all .txt files in the current directory that were open in changelist 31.

p4 revert -a
Revert all unchanged files. This command is often used before submitting a changelist.

Feb 14, 2013

Unicode clients require a unicode enabled server.

Problem: Unicode clients require a unicode enabled server.

If P4CHARSET is set in the client , but the service is not operating in internationalized mode, the service returns the following error message:

Unicode clients require a unicode enabled server.

Solution:
For Perforce services operating in the default (non-Unicode mode), P4CHARSET must be left unset (or set to none) on user workstations.P4CHARSET only affects files of type unicode and utf16; non-unicode files are never translated.

Example:

c:\p4\project\>p4 edit startbuild
Unicode clients require a unicode enabled server.

c:\p4\project>set P4CHARSET=none
c:\p4\project>p4 edit startbuild
//project/startbuild#1 - opened for edit



For Perforce services operating in Unicode mode, P4CHARSET must be set on user machines. If P4CHARSET is unset, but the service is operating in Unicode mode, Perforce applications return the following error message:
Unicode server permits only unicode enabled clients.

c:\p4\project\>set P4CHARSET=UTF-8
c:\p4\project\>p4 edit startbuild
Character set must be one of:
none, utf8, utf8-bom, iso8859-1, shiftjis, eucjp, iso8859-15,
iso8859-5, macosroman, winansi, koi8-r, cp949, cp1251,
utf16, utf16-nobom, utf16le, utf16le-bom, utf16be,
utf16be-bom, utf32, utf32-nobom, utf32le, utf32le-bom, utf32be,
or utf32be-bom
Check P4CHARSET and your '-C' option.

c:\p4\project\>set P4CHARSET=utf8

For further information refer http://www.perforce.com/perforce/r12.2/manuals/cmdref/env.P4CHARSET.html

Sep 18, 2012

Unicode server permits only unicode enabled clients. - Internationalization and Localization

Problem: Unicode clients require a unicode enabled server.

If P4CHARSET is set in the client , but the service is not operating in internationalized mode, the service returns the following error message:

Unicode clients require a unicode enabled server.

Solution:
For Perforce services operating in the default (non-Unicode mode), P4CHARSET must be left unset (or set to none) on user workstations.P4CHARSET only affects files of type unicode and utf16; non-unicode files are never translated.

Example:

c:\p4\project\>p4 edit startbuild
Unicode clients require a unicode enabled server.

c:\p4\project>set P4CHARSET=none
c:\p4\project>p4 edit startbuild
//project/startbuild#1 - opened for edit



For Perforce services operating in Unicode mode, P4CHARSET must be set on user machines. If P4CHARSET is unset, but the service is operating in Unicode mode, Perforce applications return the following error message:
Unicode server permits only unicode enabled clients.

c:\p4\project\>set P4CHARSET=UTF-8
c:\p4\project\>p4 edit startbuild
Character set must be one of:
none, utf8, utf8-bom, iso8859-1, shiftjis, eucjp, iso8859-15,
iso8859-5, macosroman, winansi, koi8-r, cp949, cp1251,
utf16, utf16-nobom, utf16le, utf16le-bom, utf16be,
utf16be-bom, utf32, utf32-nobom, utf32le, utf32le-bom, utf32be,
or utf32be-bom
Check P4CHARSET and your '-C' option.

c:\p4\project\>set P4CHARSET=utf8

For further information refer
http://www.perforce.com/perforce/r12.2/manuals/cmdref/env.P4CHARSET.html
http://kb.perforce.com/article/66/internationalization-and-localization
http://cygwin.com/cygwin-ug-net/setup-locale.html
 

Feb 16, 2011

//dev/project-app/...#head - file not in client view.

Problem:

while trying to get some file it fails and throws error

//dev/project-app/...#head - file not in client view.
p4 sync //dev/project-app/...#head
    no files updated
    1 warning reported

Solution:

Perforce depot or path not in view. Edit your workspace to include the required path.

For example in above case - GO   Connection -> Edit current workspace -> click tab on 'View' -> choose the required depot and include tree(dev)

Note - when you press 'Apply' it will ask for "Get latest revisions of all files added to your workspace view? "
choose 'Don't Get Latest'

Aug 31, 2010

Fatal client error; disconnecting! open for write: /home/mohant2/tmp.9257.9: Permission denied

Problem :
perforce throwing below error when you are trying to access or login

Fatal client error; disconnecting!
open for write: /home/user/tmp.9257.9: Permission denied

Solution:
check permissions of  /home/user under /home. it must be root or something else. change the permissions to respective user by chown and try again. it will execute.

Aug 12, 2010

No files to submit. File(s) couldn't be locked.

When you try to checkin files into perforce it will fail complaining

                No files to submit.

                File(s) couldn't be locked.

                Submit failed -- fix problems above then use 'p4 submit -c 114440'

Solution:

This is because you dont have permission to checkin files in that particular branch. Add persmission to that branch for the respective perforce username by editing 'protect' table and try checkin files.



If you find this information helpful, please click the ads below

Nov 4, 2009

Perforce error while trying to remove folder from workspace

Error:
 Can't clobber writable file C:\thiagu\Perforce\thiagu_p4server.net_1777\dev-app\Application.Properties
Solution:
files are having write persmission. check in or submit and the try syncing.
or try removing the workspace and get the latest revision again