Dec 13, 2013

how to add files under apache server

In Apache server, add your contents under a directory and create symlink to it under /var/www/html/

or

move your directory under /var/www/html/

How to send mail in linux

mail -s "Hello world" mohan@yahoo.com

Use Control+D to move next item

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