Skip to main content

Perforce

Installation of P4 :
1. Download setup and Mark p4 as executable:
 -bash-3.2$ pwd
/data/home/admin/santosh/softlib
-bash-3.2$ chmod +x p4
-bash-3.2$ ls -l
total 2376
-rwxr-xr-x 1 admin admin 2431784 Oct 16 12:20 p4

2. Copy p4 under /use/local/bin
-bash-3.2$ which p4
/usr/bin/which: no p4 in (/opt/jdk1.6.0_21//bin:/usr/kerberos/bin:/usr/local/bin:/bin:/usr/bin)
-bash-3.2$ sudo cp p4 /usr/local/bin/

We trust you have received the usual lecture from the local System
Administrator. It usually boils down to these three things:

    #1) Respect the privacy of others.
    #2) Think before you type.
    #3) With great power comes great responsibility.

[sudo] password for admin:
-bash-3.2$ which p4
/usr/local/bin/p4
-bash-3.2$
3. Set Environment Variables :
You will need to set the following environment variables:
P4PORT = perforce.santosh.com:1666
P4HOST = your host name
P4CLIENT = <client-name>
*Default is hostname (which as noted above will change)
P4USER = <perforce user name>
*Set if different from $USER
P4EDITOR = /path/to/vi or emacs
*Defines default editor for files
§  Create workspace dir where u want to sync the repository
§  under your workspace create p4 config file
§  add export path in your ~/.bashrc file.
-bash-3.2$ pwd
/data/home/admin/santosh
-bash-3.2$ mkdir myworkspace
-bash-3.2$ cd myworkspace/
/data/home/admin/santosh/myworkspace
-bash-3.2$ vi .p4config
P4PORT=perforce.santosh.com:1666
P4HOST=vm12.santosh.com
P4CLIENT=vm12.santosh.com
P4USER=santosh
P4EDITOR=vi
export P4PORT
export P4HOST
export P4CLIENT
export P4USER
export P4EDITOR
-bash-3.2$ vi ~/.bashrc
export P4CONFIG=.p4config
To reload the bash profile, use bash command or logout and login again
-bash-3.2$ bash
4. Set login :
§  if your login for the first time then you need to set the password first and then login
§  bash-3.2$ p4 passwd
§  Enter new password:
§  Re-enter new password:
§  bash-3.2$ p4 login
§  Enter password:
§  User santosh logged in.
§  bash-3.2$
5. Create P4 Client workspace :
§  Go to your workspace dir and create the client profile
§  bash-3.2$ p4 client
***Your P4 Client setup is done and ready for use ***
Sync required dir :
bash-3.2$ p4 sync //main/test.py
bash-3.2$ p4 sync //main/lib/...
bash-3.2$ p4 sync //main/Utilities/...
bash-3.2$ p4 sync //main/ext/...
bash-3.2$ pwd
/data/home/admin/santosh/myworkspace/main
bash-3.2$ ls
ext  test.py  lib  Utilities

Comments

Popular posts from this blog

Drop all Objects from Schema In Postgres

To Drop all objects from Postgres Schema there could be following two approaches: Drop Schema with cascade all and re-create it again.  In some cases where you dont want to/not allowed to drop and recreate schema, its easy to look for objects on current schema and drop them. following script would help to do so, Create function which would do the task and then drop that function too. --- CREATE OR REPLACE FUNCTION drop_DB_objects() RETURNS VOID AS $$ DECLARE  rd_object RECORD; v_idx_statement VARCHAR(500);   BEGIN ---1. Dropping all stored functions RAISE NOTICE '%', 'Dropping all stored functions...'; FOR rd_object IN ( SELECT format('%I.%I(%s)', ns.nspname, p.proname, oidvectortypes(p.proargtypes)) as functionDef     FROM pg_proc p     INNER JOIN pg_namespace ns ON (p.pronamespace = ns.oid)    WHERE ns.nspname = current_schema      AND p.proname <...

Distributed transaction in Oracle ( Over Oracle DBLink)

To fetch the data from one server to and other Oracle server over DBLink, I experienced the following facts of Oracle Distributed transactions: Security issue: -           We cannot create Public synonym for the remote object accessed over Private DBLink of other Database.   -           It’s allowed to create private synonym for remote object, but you cannot grant the access over this synonym to any other schema. If you try to provide the grants to other schema Oracle raises an error:              [ORA-02021: DDL operations are not allowed on a remote database] “In an all you can access remote objects over private DBLink in the same schema where DBLink is created”. Fetching the Ref Cursor at Remote site:                   Let’s say we have two site...

Vacuum Analyze Full Schema in PostgreSQL Database

To analyze full database schema, you can use following shell script : -------------------------------------------------------------------------------------------------------------------------- #!/bin/sh rm -rf /tmp/vacuum_analyze_MyData.sql dbname="mydata" username="mydatadatamart" namespace="mydatadatamart" # Vacuum only those tables which are fragmented over 30% # Analyze tables only if they are not already # Process CMF and Groups Master table every time as they are master Tables=`psql $dbname $username << EOF SELECT 'VACUUM ANALYZE VERBOSE ' || tablename || ' ;' AS TableList   FROM ( SELECT *,       n_dead_tup > av_threshold AS "av_needed",       CASE WHEN reltuples > 0      THEN round(100.0 * n_dead_tup / (reltuples))       ELSE 0       END AS pct_dead FROM (SELECT C.relname AS TableName, pg_stat_get_tuples_inserted(C.oid) AS n_tup_ins, pg_s...