TalkPHP
 
 
Account Login
Latest Articles
» The basic usage of PHPTAL, a XML/XHTML template library for PHP
» Vulnerable methods and the areas they are commonly trusted in.
» Simple way to protect a form from bot
» The Basics On: How Session Stealing Works
» How to keep your forms from double posting data
IRC Channel
IRC Speech Bubble Join the friendly bunch on IRC...
(#TalkPHP on Freenode)

...Also available via a web interface.

See this thread for information on the TalkPHP Free Hugs Initiative™. Subject to availability.
Associates
Associates
CSS Tutorials
Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old 09-08-2008, 12:18 PM   #1 (permalink)
The Prestige
Advanced Programmer Top Contributor Good Samaritan 
 
sketchMedia's Avatar
 
Join Date: Oct 2007
Location: Manchester, UK
Posts: 854
Thanks: 32
sketchMedia is on a distinguished road
Default basic SVN Guide

SVN - Simple Guide (linux and windows command line)
Note: For the examples I have used an imaginary SVN repo (reository) called: ----http://test.talkphp.com-----. On this repo i have imported 2 TalkPHP scripts:
  • TalkPHP_Login
  • TalkPHP_Gravatar
in order to give some meaning to the examples.

Also '$' denotes the linux command line, i dont know any GUI's so someone else will have to write about them, the commands here are identical to SVN on the windows command line (you will need to download the Binarys from the SVN site)

The general structure is (basic, im not going into trunk tags and branches):
Code:
-TalkPHP_Login/
    -TalkPHP_Login/
        -levels/
            -levels_super_administrator.php
            -levels_administrator.php
            -levels_moderator.php
            -levels_user.php
        -access.php
        -accounts.xml
        -include.php
    -.htaccess
    -index.php
    -gpl.txt

-TalkPHP_Gravatar/
    -index.php
    -TalkPHP_Gravatar.php
checkout:
Code:
svn (co | checkout) http://test.talkphp.com/folderstructuretocheckout nameofdirtocreate --username xxxxx --password xxxxx [-N -r -q]
N.B.For more information about the extra options type
Code:
svn co --help
You can either use checkout or the shorthand co, you may also need to specify a username and pass, you can specify these by typing --username and --password otherwise it will use the username you are currently using on your computer, in my case 'sam' which is incorrect for the repo's username 'sketchmedia'
Code:
$svn co http://repo/dir --username sketchmedia --password xxxxxxx
example:
I want to checkout the TalkPHP_Login folder from the repo and I want to save it in a folder called 'testdir' (this is optional, if not specified it will create a dir based on the folder name being checkout) on my local machine, here is the SVN command to do so (with the results below, the lines beginning with 'A' are results, basically it means Added to the local DIR):
Code:
    $svn co http://svn.assembla.com/svn/talkphp/TalkPHP_Login testdir
    A    test2dir/TalkPHP_Login/gpl.txt
    A    test2dir/TalkPHP_Login/TalkPHP_Login
    A    test2dir/TalkPHP_Login/TalkPHP_Login/include.php
    A    test2dir/TalkPHP_Login/TalkPHP_Login/levels
    A    test2dir/TalkPHP_Login/TalkPHP_Login/levels/levels_administrator.php
    A    test2dir/TalkPHP_Login/TalkPHP_Login/levels/levels_moderator.php
    A    test2dir/TalkPHP_Login/TalkPHP_Login/levels/levels_super_administrator.php
    A    test2dir/TalkPHP_Login/TalkPHP_Login/levels/levels_user.php
    A    test2dir/TalkPHP_Login/TalkPHP_Login/.htaccess
    A    test2dir/TalkPHP_Login/TalkPHP_Login/access.class.php
    A    test2dir/TalkPHP_Login/TalkPHP_Login/accounts.xml
    A    test2dir/TalkPHP_Login/index.php
    Checked out revision 25.
If no dir name specified:
Code:
    $svn co http://test.talkphp.com/TalkPHP_Login
    A    TalkPHP_Login/gpl.txt
    A    TalkPHP_Login/TalkPHP_Login
    A    TalkPHP_Login/TalkPHP_Login/include.php
    A    TalkPHP_Login/TalkPHP_Login/levels
    A    TalkPHP_Login/TalkPHP_Login/levels/levels_administrator.php
    A    TalkPHP_Login/TalkPHP_Login/levels/levels_moderator.php
    A    TalkPHP_Login/TalkPHP_Login/levels/levels_super_administrator.php
    A    TalkPHP_Login/TalkPHP_Login/levels/levels_user.php
    A    TalkPHP_Login/TalkPHP_Login/.htaccess
    A    TalkPHP_Login/TalkPHP_Login/access.class.php
    A    TalkPHP_Login/TalkPHP_Login/accounts.xml
    A    TalkPHP_Login/index.php
We can also checkout 2 different directories (and repos i think) from SVN
Code:
$ svn co http://test.talkphp.com/TalkPHP_Login  http://test.talkphp.com/TalkPHP_Gravatar
A    TalkPHP_Login/gpl.txt
A    TalkPHP_Login/TalkPHP_Login
A    TalkPHP_Login/TalkPHP_Login/include.php
A    TalkPHP_Login/TalkPHP_Login/levels
A    TalkPHP_Login/TalkPHP_Login/levels/levels_administrator.php
A    TalkPHP_Login/TalkPHP_Login/levels/levels_moderator.php
A    TalkPHP_Login/TalkPHP_Login/levels/levels_super_administrator.php
A    TalkPHP_Login/TalkPHP_Login/levels/levels_user.php
A    TalkPHP_Login/TalkPHP_Login/.htaccess
A    TalkPHP_Login/TalkPHP_Login/access.class.php
A    TalkPHP_Login/TalkPHP_Login/accounts.xml
A    TalkPHP_Login/index.php
Checked out revision <revision number>.

A    TalkPHP_Gravatar/TalkPHP_Gravatar.php
A    TalkPHP_Gravatar/index.php
Checked out revision <revision number>.
As you can see it checked out both folders from the repo.

Checkout acts recursively, in other words will recursively download everything from that root dir (the one you specify) as you can see from the above examples. To stop this behavior you can use the -N arg:
Code:
svn co http://svn.assembla.com/svn/talkphp/TalkPHP_Login -N 
A    TalkPHP_Login/gpl.txt
A    TalkPHP_Login/index.php
Checked out revision 25.
Here you can see it only checked out the contains of the root and did not recursively download the rest.

You can also specify a revision to download, a revision is a snapshot of the code from the past (or future), for this you use the '-r' flag then the revision number, in our previous example it stated 'checkout revision 25' which is the current revision or 'HEAD' in SVN speak. I will use the -r flag to retrieve revision 24:
Code:
$svn co http://svn.assembla.com/svn/talkphp/TalkPHP_Login -r 24 -N
A    TalkPHP_Login/gpl.txt
A    TalkPHP_Login/index.php
Checked out revision 24.
That's about it for a rough guide checkout, any questions just ask.

I'll finish the other parts and post them later.

Next Part: Update and Conflicts
__________________
mysql> SELECT * FROM `users` WHERE `users`.`clue` > 0;
Empty set (0.00 sec)

Last edited by sketchMedia : 09-08-2008 at 06:12 PM.
sketchMedia is offline  
Reply With Quote
Old 09-17-2008, 12:36 AM   #2 (permalink)
The Prestige
Upcoming Programmer Inquisitive 
 
Tanax's Avatar
 
Join Date: Sep 2007
Location: Sweden, Stockholm
Posts: 1,080
Thanks: 115
Tanax is on a distinguished road
Default

Exactly, what does this do?

I mean.. I know what it DOES, but what's the use of it?
Nicely written!
__________________
Tanax is offline  
Reply With Quote
Old 09-17-2008, 09:07 AM   #3 (permalink)
The Prestige
Advanced Programmer Top Contributor Good Samaritan 
 
sketchMedia's Avatar
 
Join Date: Oct 2007
Location: Manchester, UK
Posts: 854
Thanks: 32
sketchMedia is on a distinguished road
Default

SVN is a version control system or VCS.

SVN or any VCS like CVS etc help control files and the changes to them, it basically allows you to track them over time. Each file is given a 'revision' number and every time a change is made to that file the revision number increments thus allowing you to do all sorts of things.

For example:
I make a change to the code held within the repository and lets say, I made a right hash of it; well with a vcs its easy to just revert back to a previous revision number (in svn i believe its called a reverse merge).

A better, more indepth guide to the concepts of version controlling:
A Visual Guide to Version Control | BetterExplained
__________________
mysql> SELECT * FROM `users` WHERE `users`.`clue` > 0;
Empty set (0.00 sec)
sketchMedia is offline  
Reply With Quote
Old 09-21-2008, 09:34 PM   #4 (permalink)
The Prestige
Upcoming Programmer Inquisitive 
 
Tanax's Avatar
 
Join Date: Sep 2007
Location: Sweden, Stockholm
Posts: 1,080
Thanks: 115
Tanax is on a distinguished road
Default

Ah I see!
Thanks a bunch :)
__________________
Tanax is offline  
Reply With Quote
Old 10-18-2012, 01:52 PM   #5 (permalink)
The Addict
 
Join Date: Oct 2012
Posts: 244
Thanks: 0
dashixiong is on a distinguished road
Default

Some conservatives have Coach Factory Outlet pushed that critique further, saying that Mr. Obama’s policies are too costly, often assist the wrong people Louis Vuitton Belts and could have the paradoxical effect of driving up college costs. The dispute turns not just on different Coach Factory Outlet assessments of how policies play out, but on differing philosophical views about the role of government. During Gucci Belts his time in office, Mr. Obama has sharply increased aid to low- and middle-income students, notably through the Pell Grant Coach Factory Outlet program, which grew from $14.6 billion given to 6 million students in 2008, to nearly $40 billion for Coach Factory Outlet almost 10 million students this year. His administration also made it easier to request aid, shortening the Coach Factory Online complex federal application and allowing people to transfer their financial information electronically from the Internal Coach Outlet Online Revenue Service database. But while many education experts laud his efforts, analysts of varying political Coach Outlet Online stripes have also questioned how much impact some of the president’s policies will have, noting that the prices Coach Online Outlet charged by colleges, and student borrowing, continue to climb.But behind the headlines about soaring costs, the Coach Factory Outlet Online reality is more complex and wildly uneven, because a growing number of students receive Coach Outlet Online financial aid, and only relatively high-income families pay those fast-rising sticker prices. Adjusted for Coach Factory Online inflation, the College Board calculates, the average net price changed little over the last decade at private Coach Factory Outlet schools, and rose only modestly at public ones.Defending federal spending, Arne Duncan, the secretary of Hermes Belts education, said that for more than 30 years, college prices had risen even when federal aid had not, leading him to believe Coach Factory Online there was zero correlation.
dashixiong is offline  
Reply With Quote
Old 10-22-2012, 09:35 AM   #6 (permalink)
The Addict
 
Join Date: Oct 2012
Posts: 244
Thanks: 0
dashixiong is on a distinguished road
Default Coach Outlet

You’ve relativelyCoach Outlet recently arrived in New Delhi after living in two of Asia’s other great cities,Coach Outlet Store Online Tokyo and Hong Kong, for several years. Do these cities feel like they’re part of the same continent? Yes, and no. In terms Coach Factory Onlineof infrastructure, they couldn’t be more different. Getting regularCoach Outlet power and water at my house in New Delhi is never a sure thing, even though Coach Purse Outlet OnlineI’m paying the same rent that I paid in Tokyo and almost the same electricity prices. Both Hong Kong and Tokyo are also crowded places,Coach Factory Outlet Online but both cities are incredibly well planned and efficiently run. Efficient is not a word I would use to describe my Coach Bags Outlet Onlineday-to-day life in New Delhi. On the other hand, one thing that I think Hong Kong and New Delhi have in common isCoach Handbags Outlet a shared sense of optimism — a feeling that the best is yet to come. That’s definitely not the feeling you get in Tokyo,Coach Outlet Online or in the U.S. when I go home. It’s a big part of what I find addictive about living and working in this part of the world. You feel like you’re watching the future unfold.
dashixiong is offline  
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


All times are GMT. The time now is 08:08 PM.

 
     

Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0
Inactive Reminders By Icora Web Design