WordPress.org

Ready to get started?Download WordPress

Forums

svn + wordpress = how? (32 posts)

  1. somefool
    Member
    Posted 9 years ago #

    Ive been reading about how great this upgrading wordpress via svn is, but HOW exactly do I do it?
    Ive got as far as installing subversion and a client on my Mac. Even connectiong to the wordpress svn and listing the files (even though the WP svn page is less than clear about wtf you do to get this far :-( ).
    Now what do I do? I managed to download the files to my Mac, but I cant get it to diff (I think thats the term) the files so that I dont have to manually replace files. Moreover, how do I then get it to upload to my webserver?

    yours, an svn n00b

  2. Ryan Duff
    Member
    Posted 9 years ago #

    somefool: I replied to this in the other thread.

    You're looking for the SVN Book

    Oh yeah, that link is also mentioned on the WP SVN page you linked to in your post.

  3. somefool
    Member
    Posted 9 years ago #

    I replied on that too, I thought a new thread might be best though as its a slightly different subject.

    heres my post from there if youd like to move it to here

    I did look, but its all VERY overwhelming and surely unnecessary if you just want to use it to upgrade? Its a bit like handing someone who want to know how to print, instructions on disassembling and rebuilding a computer from scratch.

    SVN seems to be bandied about like everyone should know what it is/does, might I suggest a more descriptive walkthrough on the svn page?

  4. Ryan Duff
    Member
    Posted 9 years ago #

    What do you want to do with it? update the files you have locally?

  5. somefool
    Member
    Posted 9 years ago #

    Update the files on my server (not local, regular web server) as matt shows is apparently easy to do.

    I have 4 installs of WP in my server and some other installs on other peoples servers, this easy upgrading would be a boon.

  6. Mark (podz)
    Support Maven
    Posted 9 years ago #

    A walkthrough would be counterproductive.

    The forums were awash with people trying to use nightlies in the run up to 1.2. People installed it then came here screaming and yelling about the fact the code was not perfect, despite the fact that nightlies are not guaranteed stable code. Because people were praising 1.2, more people got nightlies, more people complained...

    I was one of those that said we needed to make access to nightlies and svn code much much harder. Matt did make some changes including the testers mailing list and the forum benefited from that - there was a LOT less clutter from people trying the 'bleeding edge' code.

    1.5.1.1 is now out, and there are discussions about where and how WP should move on. Undoubtedly there will be core code changes that will affect much of how WP works, and this code will be freely available through svn. A guide to using svn to get and use the latest code would just mean that people would download, install then come here screaming and yelling that the very latest code broke their blog. And if they did, they would get no help because no-one else would be foolish enough to run svn code at that stage on a production blog, but that would not be good enough for them and they'd have a tantrum. It's happened here before.
    So I favour svn remaining hidden as much as possible.

    That said, if you have a specific need, I would suggest #wordpress for advice.

  7. Ryan Duff
    Member
    Posted 9 years ago #

    You could alternatively do a

    svn checkout http://svn.automattic.com/wordpress/trunk ./

    from within your wordpress/ directory on your web server.

  8. Mark (podz)
    Support Maven
    Posted 9 years ago #

    Advice to other readers tempted to use svn this way:

    If you don't know both what you are doing and how to fix it should you get it wrong, please do not do it.

  9. somefool
    Member
    Posted 9 years ago #

    "The forums were awash with people trying to use nightlies in the run up to 1.2. People installed it then came here screaming and yelling about the fact the code was not perfect, despite the fact that nightlies are not guaranteed stable code. Because people were praising 1.2, more people got nightlies, more people complained..."

    Thats fine and I agree wholeheartedly, but if these terms are bandied about there should be a suitable description in the codex or on the download/svn page.

    "You could alternatively do a
    svn checkout http://svn.automattic.com/wordpress/trunk ./
    from within your wordpress/ directory on your web server."

    Im assuming you mean from in a terminal?

  10. Mark (podz)
    Support Maven
    Posted 9 years ago #

    "there should be a suitable description in the codex or on the download/svn page"

    I agree - sort of :)
    If the download page had big red warnings in 72pt text, with siren wavs blaring and a button that said "By downloading this you promise to not blame anyone but yourself when your blog goes BANG!" then some people would still download, install then yell blue murder.

  11. somefool
    Member
    Posted 9 years ago #

    well im still lost, Ive installed subversion, and in terminal "svn checkout http://svn.automattic.com/wordpress/trunk ./" just returns "svn: Command not found."

    Yet the GUI app for svn seems fine, but I dont know how to do 'diff'ing. Maybe I should just give up, it seems hellacomplicated, Im just envious.

  12. somefool
    Member
    Posted 9 years ago #

    "By downloading this you promise to not blame anyone but yourself when your blog goes BANG!"

    Its not so much that imo, as just an explanation of what svn is, what it does, how it works etc etc.

    Btw, the search in wordpress support atm is awful, it should (again imo) either just search in the support forums or have an option to include/exclude the codex etc as its VERY confusing.

  13. ifelse
    Member
    Posted 9 years ago #

    "SVN seems to be bandied about like everyone should know what it is/does, might I suggest a more descriptive walkthrough"
    It isn't bandied around. It's predominently a developers tool. Unless you're fully aware of what SVN is and what it does, then you shouldn't be attempting it.

    The SVN book is the ultimate resource. SVN is more than an update tool and not attempting to understand it will only lead to heartache.

    [Edited as it wasn't as constructive as I would have liked. My apologies]

  14. somefool
    Member
    Posted 9 years ago #

    I saw it on Matts site and a few other sites, its not too much surely to expect something explaining it on the codex.

    Its like when I suggested I adding my plugin to the plugins database and was told 'use svn'. Err duh, I need a little more explanation please.

    Maybe 'bandied' was a slightly inflammatory word, but I think the search had just irritated me. I had done a good few googles and searches before foisting my spleen upon the forums, honest.

    I understand that upgrading is just something that can be done with svn and isnt the be all and end all, but if thats all I want to do then surely theres gotta be a means to explaining it in plain(ish) english without sending me to instruction manuals?

  15. somefool
    Member
    Posted 9 years ago #

    ...btw, I dont want to sound ungrateful, if its REALLY not worth the hassle then I wont bother, I was just trying to add more feathers to my WP bow.

  16. ifelse
    Member
    Posted 9 years ago #

    My apologies. In retrospect, what I wrote sounds harsher than I would have liked. I should have instead explained what was involved rather than bite. Call it a bad day, I'm not usually like this:-)

    To make amends, I'll attempt to give an overview of what SVN is:

    SVN is a what is known as a version control or source control management (SCM) tool. It's a way to maintain and track changes in source code. The concept is simillar to a library in that you have to check code in and out. You check in changes to what is stored in the code base (the repository) and the SCM maintains a log of these changes.

    This means you can, for example, see what has changed, get the latest version of the code or even a specific version, and always have something to go back to if something goes wrong.

    The first thing you need to do when using SVN is a checkout.When you do a SVN checkout, it gets out the latest version of the code.

    Now that you have a fresh checkout, you can do a SVN update.

    When you do a SVN update, what it does is updates the code that you have checked out to what is in the repository. If the code in the repository has changed, you get the latest version.

    There's a lot more to it but I hope that gives you a head start in understanding SVN.

  17. ifelse
    Member
    Posted 9 years ago #

    I was just trying to add more feathers to my WP bow.
    It's always good to learn and I hope I haven't put you off. Just be sure to try things out in a safe environment first:-)

  18. somefool
    Member
    Posted 9 years ago #

    No apologies needed, I know how the many good support people here get pissed off with others complaining and I dont expect a walkthrough just because I ask for it.

    I still dont think its unreasonable though, when someone as high up the WP echelons (possibly the top) mentions SVN and the ease of upgrading WP twice in quick succession on his site to hope for detailed examples of SVN in relation to WP and how it would work with upgrading.

    Atleast SOME sort of mention on the codex and more than the pitiful page on the WP downloads area, which unless you have experience of SVN is really no more than "you can use svn, heres some commands" would not seem too much.

    Again, Im grateful for the support there is, I try and help myself when I can, but can those more experienced in certain (possibly more obscure) areas please think about suitable explanations when they are posting what could be truly helpful items.

    ... phew, and relax.

  19. somefool
    Member
    Posted 9 years ago #

    "It's always good to learn and I hope I haven't put you off. Just be sure to try things out in a safe environment first:-)"

    I would, but Im still not sure how to actually proceed and try something. Ive got svn downloading the latest WP through a GUI app to my local drive, but I dont know how I get it to 'diff' files or indeed then do this remotely on my server.

  20. ifelse
    Member
    Posted 9 years ago #

    I'm a bit busy with the day job at the moment but if there are no responses, I'll try to write a quick writeup later this week with step by step instructions.

    Basically though, the process is:
    Telnet or SSH to your remote server
    Navigate to where you want to check out
    svn co http://svn.automattic.com/wordpress/trunk/

    Now in future, if you want to update, do a:
    svn update

    Be aware that SVN does need to be installed on the remote server.

  21. Firas
    Member
    Posted 9 years ago #

    You don't need to diff anything, just update, which won't mess with files you've changed. One thing: to be doing it remotely on your server they have to be SVN repositories to start with; you almost absolutely will need access to the shell or other ways of passing commands to it.

  22. somefool
    Member
    Posted 9 years ago #

    OK, thanks. Looks like I cant do it then as I cant ssh to my server, I havent tried telneting but I guess I wont be able to do that either.

    Thanks again anyway, Im sure others would find a write up useful though.

  23. chuyskywalker
    Member
    Posted 9 years ago #

    somefool,

    Actually, with a bit of PHP trickery, you could do this withouth SSH access. The real issue is if SVN is installed on your host or not.

    Generall, using system() or exec() you can run code as if you were in SSH via a php script. Example:

    <?php
    echo exec('svn help');
    ?>

    In fact, you might upload a simple php script just like that and see if it works.

  24. vkaryl
    Member
    Posted 9 years ago #

    Won't work if the host disallows use of system() or exec() - mine doesn't let one do so....

  25. somefool
    Member
    Posted 9 years ago #

    chuyskywalker - I put that up as a php file on my server and it didnt output anything, no errors or anything, so I assume it wont work for me?

    Thanks though.

  26. chuyskywalker
    Member
    Posted 9 years ago #

    You may just be stuck then. Write your host? Maybe they'll be cool and install it for you and give you SSH access.

    I'm with ASO -- and they did just that at customer request. Quick too, like, < 12 hour turnaround. Pretty awesome.

  27. Firas
    Member
    Posted 9 years ago #

    /* Script has shell access */
    $shell_exists = shell_exec('ls');

    if(empty($shell_exists)) {
    echo "<p>Sorry, can't use shell_exec()</p>"; die();
    } else {
    echo "Can use shell_exec(), proceeding!";
    }

    /* The SVN binary is available */
    $svn_exists = shell_exec('which svn');

    if(empty($svn_exists)) {
    echo "<p>Sorry, no SVN</p>"; die();
    } else {
    echo "<p>SVN available!</p>";
    }

  28. Firas
    Member
    Posted 9 years ago #

    Er... enclose that with <?php at the start and ?> at the end, save to a file with a .php extension, and run it to see what's up.

  29. somefool
    Member
    Posted 9 years ago #

    "Can use shell_exec(), proceeding!
    Sorry, no SVN"

    Ahhh, oh well.

    I might contact my host, Ill have to have a think, cheers again all.

  30. Ryan Boren
    WordPress Dev
    Posted 9 years ago #

    You can use svn on your local machine and rsync the content to your host. Most hosts support rsync over ssh these days.

    * svn co http://svn.automattic.com/wordpress/trunk/ wp
    * cd wp
    * Setup wp-config.php. Make customizations.
    * svn update #Pull down and merge upstream changes
    * rsync -avz -C --exclude='*.svn' -e ssh ./ me@mydomain.com:/path/to/public_html/wordpress/ # Push the changes to your host.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags