Sponsored Content
Top Forums Programming Perl: restrict perl from automaticaly creating a hash branches on check Post 302924130 by gandolf989 on Thursday 6th of November 2014 12:32:18 PM
Old 11-06-2014
Quote:
Is there a way to avoid such aromatic creation ????
I am new to Perl, but I have not found Perl to be very aromatic... ;-)

IMHO, I don't think you should check the branches for TRUE OR FALSE. Perl isn't very good at TRUE and FALSE.
Either you have data or you don't. So you should check for an empty sting and not worry about what the internal hash looks like.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Perl Hash

HI I have a hash like this $hashname->{$filesystem}->{'fsname'}=$filesystem; How to get the values from this multilevel hash. Thanks in advance... :) (1 Reply)
Discussion started by: Harikrishna
1 Replies

2. Shell Programming and Scripting

Perl Hash

hi i have two hash achi %disk1,%disk2 with( key, value) (key1,value1) How to store it in another hash.. Plz replyyy. Regards Hari (1 Reply)
Discussion started by: Harikrishna
1 Replies

3. Shell Programming and Scripting

perl (word by word check if a hash key)

Hi, Now i work in a code that 1-get data stored in the database in the form of hash table with a key field which is the " Name" 2-in the same time i open a txt file and loop through it word by word 3- which i have a problem in is that : I need to loop word by word and check if it is a... (0 Replies)
Discussion started by: eng_shimaa
0 Replies

4. UNIX for Advanced & Expert Users

Perl loop txt and check if a hash key

Hi, The task i have to do is to 1- create a database contains the Names .run the query and store results in hash make the Name field is the hash key 2- in the same time i have a txt which i will loop through it word by word and check for each word if a hash key ( compare it with the Names in... (0 Replies)
Discussion started by: eng_shimaa
0 Replies

5. Shell Programming and Scripting

Perl Hash:Can not keep hash data in the same order that it was inserted

Can Someone explain me why even using Tie::IxHash I can not get the output data in the same order that it was inserted? See code below. #!/usr/bin/perl use warnings; use Tie::IxHash; use strict; tie (my %programs, "Tie::IxHash"); while (my $line = <DATA>) { chomp $line; my(... (1 Reply)
Discussion started by: jgfcoimbra
1 Replies

6. Shell Programming and Scripting

perl hash - using a range as a hash key.

Hi, In Perl, is it possible to use a range of numbers with '..' as a key in a hash? Something in like: %hash = ( '768..1536' => '1G', '1537..2560' => '2G' ); That is, the range operation is evaluated, and all members of the range are... (3 Replies)
Discussion started by: dsw
3 Replies

7. Shell Programming and Scripting

Perl hash help

Hi , i have the below code its working fine when i execute in unix , but its not working in windows could you pls explain me where i am going wrong. This is the program $data = { '1' => 'one' , '2' => 'two' , 3 => 'three' }; print "hello : $data->{'1'}... (2 Replies)
Discussion started by: ragilla
2 Replies

8. Shell Programming and Scripting

Compare values of hashes of hash for n number of hash in perl without sorting.

Hi, I have an hashes of hash, where hash is dynamic, it can be n number of hash. i need to compare data_count values of all . my %result ( $abc => { 'data_count' => '10', 'ID' => 'ABC122', } $def => { 'data_count' => '20', 'ID' => 'defASe', ... (1 Reply)
Discussion started by: asak
1 Replies

9. Programming

Perl: How to load some functions automaticaly, starting Perl inteructively (with -d -e 0)?

I would like to use Perl in 'interactive' mode (kind off), starting it by > perl -d -e 0; But I need to have some function be read on loading. Also, it should not be for anyone who starting Perl or use it any how. I did try to search, but not much result. I have try a file '.perldb':... (1 Reply)
Discussion started by: alex_5161
1 Replies

10. Shell Programming and Scripting

Restrict remote DB connection from PERL

I have PERL code to connect to Oracle database using DBI. e.g. $PERL -e "use DBI; DBI->connect(qw(DBI:Oracle:db111 testu testpass));" by using DBI , if remote DB added to tnsnames.ora , I can connect using DBI . is there a way to restrict not to connect to remote DB using DBI ? ... (1 Reply)
Discussion started by: talashil
1 Replies
SVK::Command::Branch(3) 				User Contributed Perl Documentation				   SVK::Command::Branch(3)

NAME
SVK::Command::Branch - Manage a project with its branches SYNOPSIS
branch --create BRANCH [DEPOTPATH] branch --list [--all] branch --create BRANCH [--tag] [--local] [--switch-to] [--from|--from-tag BRANCH|TAG] [DEPOTPATH] branch --move BRANCH1 BRANCH2 branch --merge BRANCH1 BRANCH2 ... TARGET branch --checkout BRANCH [PATH] [DEPOTPATH] branch --delete BRANCH1 BRANCH2 ... branch --setup DEPOTPATH branch --push [BRANCH] branch --pull [BRANCH] branch --offline [BRANCH] branch --online [BRANCH] OPTIONS
-l [--list] : list branches for this project --listprojects : list avaliable projects --create : create a new branch --tag : create in the tags directory --local : targets in local branch --delete [--rm|del]: delete BRANCH(s) --checkout [--co] : checkout BRANCH in current directory --switch-to : switch the current checkout to another branch (can be paired with --create) --merge : automatically merge all changes from BRANCH1, BRANCH2, etc, to TARGET --project : specify the target project name --push : move changes to wherever this branch was copied from --pull : sync changes from wherever this branch was copied from --setup : setup a project for a specified DEPOTPATH --from BRANCH : specify the source branch name --from-tag TAG : specify the source tag name -C [--check-only] : try a create, move or merge operation but make no changes -P [--patch] FILE : Write the patch between the branch and where it was copied from to FILE --export : used with --checkout to create a detached copy --offline : takes the current branch offline, making a copy under //local --online : takes the current branch online, pushing changes back to the mirror path, and then switches to the mirror DESCRIPTION
SVK provides tools to more easily manage your project's branching and merging, so long as you use the standard "trunk/, branches/, tags/" directory layout for your project or specifically tell SVK where your branches live. Usage (without projects) A very simple sample usage might be to checkout the trunk from a project you want to work on but don't have upstream commit rights for. This allows you to maintain a local branch and to send in patches. Assuming you have alread mirrored this repository to //mirror/Project svk co //mirror/Project/trunk or svk branch --co trunk //mirror/Project/ and then svk branch --offline You're now working in a local branch, make local commits and changes as you need to. If you want to bring in changes from your remote repository, you can pull them down svk branch --pull To see what changes you've made, you can create a patch between the local branch and the remote repository svk branch -P - --push If you have commit rights to the remote repository, you can also svk branch --push to send your changes. You can use svk branch's branching capability in this mode, but it will be much friendlier if you set up a project Usage (projects) To initialize a project in a repository, run the setup command svk branch --setup //mirror/Project If you have the standard trunk branches tags directories svk will offer them as the starting point. In fact, if you have trunk branches and tags directories, svk will try to use them without neeting --setup, but you won't be able to use the --project flag and will need to use depotpaths in commands. The rest of this documentation assumes you've set up a project called Example in //mirror/Project If you're in a working copy of svk where it can work out the Project name, you can leave off the --project flag from the examples below, but you can branch/tag/merge without having working copies Branching To check out the trunk, you can run svk branch --co trunk --project Example To create a branch for release engineering svk branch --create Exmaple-1.0-releng --project Example Since you have a checkout of trunk already, you can convert that cd trunk svk branch --switch-to Example-1.0-releng Or you can get a clean checkout svk branch --co Example-1.0-releng --project Example If changes are made on trunk and you wish to bring them down to the release engineering branch, you can do that with the branch merge command svk branch --merge trunk Example-1.0-releng If you're cautious, use the check flags first: svk branch -C --merge trunk Example-1.0-releng svk branch -P - --merge trunk Example-1.0-releng These will show you what svk wants to do. Lets say you want to add a feature to trunk but work on a branch so you don't inconvenience others who are working on trunk: svk branch --create Feature --project Example work on your feature, svk ci some changes svk branch --merge Feature trunk --project Example continue to bring down changes several ways svk branch --pull svk branch --merge trunk Feature svk branch --merge trunk . (if you're in a working copy of the branch) and then merge back more feature work as you need to To get rid of a branch when you're done with it svk branch --delete Feature --project Example To see all of your branches, you can do: svk branch --list --project Example Tagging If you've been working on your releng branch and are ready to cut a release, you can easily create a tag svk branch --tag --create 1.0rc1 --from Example-1.0-releng --project Example If you would like to check out this tag, use svk branch --tag --co 1.0rc1 --project Example Project Property Details SVK branch also provides another project loading mechanism by setting properties on root path. Current usable properties for SVK branch are 'svk:project:<projectName>:path-trunk' 'svk:project:<projectName>:path-branches' 'svk:project:<projectName>:path-tags' These properties are useful when you are not using the standard "trunk/, branches/, tags/" directory layout. For example, a mirrored depotpath '//mirror/projA' may have trunk in "/trunk/projA/" directory, branches in "/branches/projA", and have a standard "/tags" directory. Then by setting the following properties on root path of remote repository, it can use SVK branch to help manage the project: 'svk:project:projA:path-trunk => /trunk/projA' 'svk:project:projA:path-branches => /branches/projA' 'svk:project:projA:path-tags => /tags' Be sure to have all "path-trunk", "path-branches" and "path-tags" set at the same time. perl v5.10.0 2008-09-13 SVK::Command::Branch(3)
All times are GMT -4. The time now is 01:59 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy