SitePoint Sponsor

User Tag List

Results 1 to 9 of 9

Thread: version control

  1. #1
    SitePoint Wizard wheeler's Avatar
    Join Date
    Mar 2006
    Location
    Gold Coast, Australia
    Posts
    1,369
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    version control

    Hi all,

    I'm approaching a stage in my web application development where its becoming quite difficult to maintain all implementations of the code, and remember why I had made certain decisions along the way - let alone working efficiently with other developers.

    I basically just want some suggestions about how to manage projects, particularly where a new feature or bug fix involves updating multiple sites and even multiple servers.

    I am aware (though not familiar) with SVN, I am thinking something along the lines of a hybrid management application that would combine file management, task tracking, time tracking, client communication/invoicing and a facility to run sql on multiple databases.

    A have been using a great product basecamp which supports most of those requirements but is not specialised enough to be a complete solution. The other problem is my being in Australia and them in the US, working constantly on their site produces a lot of wasted loading time. And finally, why pay for something I can build myself.

    What are other people using to solve these problems?
    Studiotime - Time Management for Web Developers
    to-do's, messages, invoicing, reporting - 30 day free trial!
    Thomas Multimedia Web Development

  2. #2
    Follow Me On Twitter: @djg gold trophysilver trophybronze trophy Dan Grossman's Avatar
    Join Date
    Aug 2000
    Location
    Philadephia, PA
    Posts
    20,578
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    If you're not already using some form of version control, start doing it, regardless of what you do for the rest of the management issues. Being able to roll back any change, and look at the log of all the changes you've ever made, is just invaluable. Subversion's free and simple to use.

  3. #3
    SitePoint Wizard silver trophy kyberfabrikken's Avatar
    Join Date
    Jun 2004
    Location
    Copenhagen, Denmark
    Posts
    6,157
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    As Dan said, using a vcs is imperative to a professional setup. Get it going right now.

    That said, I think you're generally conflating a lot of unrelated tasks here. At the very least, you have mixed project management up with deployment:

    Quote Originally Posted by wheeler View Post
    ... I am thinking something along the lines of a hybrid management application that would combine file management, task tracking, time tracking, client communication/invoicing and a facility to run sql on multiple databases.
    I'm not entirely sure what you mean by "file management", but it sounds to me like that and "a facility to run sql on multiple databases" are deployment tasks. Are you currently using a framework of some sort? How do you currently deploy your application(s)?

    "task tracking" and "time tracking" are project management tasks. There are systems which integrate issue-tracking with vcs (trac for example), but this isn't really that important IMHO. Getting comfortable with using a vcs should come first.

  4. #4
    SitePoint Wizard wheeler's Avatar
    Join Date
    Mar 2006
    Location
    Gold Coast, Australia
    Posts
    1,369
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Now that I think about it I guess I can see the merits of keeping project management and deployment separate entities. To be honest I don't really think about these kinds of things, I only think about creating/finding tools that will solve all my problems at once.

    since reading dan's post I have spent quite a bit of time reading about SVN, and am now working with tortoiseSVN in XP. It's definitely pretty cool even though I don't fully understand some aspects of it.
    Are you currently using a framework of some sort? How do you currently deploy your application(s)?
    No i'm not using a framework. At this stage i'm maintaining the same application on two separate servers, however keeping both file sets up-to-date is proving to be a hassle.

    Ideally I would want to have a post-commit hook that would FTP the changed file straight to the servers, however this is technically very challenging concept for me to implement (especially on windows).

    Just a logic question in regards to SVN, specifically TortoiseSVN -

    So I have:

    - Repository
    -- working files 1
    -- working files 2

    With working files 1 & 2 linked back to the repository (so they should all be the same). The weird thing is that if I make a change to say index.php in working files 1, the file icon will change to show that the file is different to the repository - so far so good. However when I commit the change to the repository, index.php in working files 2 does not indicate any difference to the repository (even though its an older version).

    This seems to defeat the whole purpose to me? Perhaps TortoiseSVN is a bit buggy updating file status...
    Studiotime - Time Management for Web Developers
    to-do's, messages, invoicing, reporting - 30 day free trial!
    Thomas Multimedia Web Development

  5. #5
    Follow Me On Twitter: @djg gold trophysilver trophybronze trophy Dan Grossman's Avatar
    Join Date
    Aug 2000
    Location
    Philadephia, PA
    Posts
    20,578
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    TortoiseSVN does not poll the repository to check for changes, so it'll never tell you when the repository has changes for you except when you tell it to check. It knows you have local changes because your local files don't match local metadata (all that junk in the .svn folders).

    The purpose of version control is to record changesets, it's not a notification system, and not automatically synchronizing isn't a bug. Just because the repository is updated doesn't mean you necessarily want all the copies updated. You may make hundreds of changes while developing a new version of your code before you want to deploy it to a live system.

  6. #6
    SitePoint Wizard silver trophy kyberfabrikken's Avatar
    Join Date
    Jun 2004
    Location
    Copenhagen, Denmark
    Posts
    6,157
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by wheeler View Post
    To be honest I don't really think about these kinds of things, I only think about creating/finding tools that will solve all my problems at once.
    I much prefer a multitude of highly focused tools, over a single monolithic one.

    Quote Originally Posted by wheeler View Post
    Ideally I would want to have a post-commit hook that would FTP the changed file straight to the servers, however this is technically very challenging concept for me to implement (especially on windows).
    While possible, I wouldn't advice that. Deployment is usually done as an explicit action. I think perhaps the reason that you are thinking this way, is because you have a setup with two production sites, that you work on directly? If so, I would say that this is a bad practise. What you should have, is a development site (perhaps just on your local working machine) where you can test that things work. You then commit changes to the repository and once in a while you make a deploy (pulls the repository to the production sites).

    Quote Originally Posted by wheeler View Post
    The weird thing is that if I make a change to say index.php in working files 1, the file icon will change to show that the file is different to the repository - so far so good. However when I commit the change to the repository, index.php in working files 2 does not indicate any difference to the repository (even though its an older version).

    This seems to defeat the whole purpose to me? Perhaps TortoiseSVN is a bit buggy updating file status...
    You're reading it wrong. The icon signals that there is a local change relative to the version that was checked out from the repository. It doesn't show if the file has changed in the repository. I'm not sure if it's possible through TortoiseSVN, but from the command line you can call svn stat with the option -u to show which files have changed in the repository.

  7. #7
    SitePoint Guru bronze trophy
    Join Date
    Dec 2003
    Location
    Poland
    Posts
    930
    Mentioned
    7 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by wheeler View Post
    Ideally I would want to have a post-commit hook that would FTP the changed file straight to the servers, however this is technically very challenging concept for me to implement (especially on windows).
    With TortoiseSVN you can compare changes between any 2 revisions and save (export) only modified files to a separate folder maintaining the folder structure. Then you can FTP those changed files to the server in one go. I do it all the time and it's very convenient.

  8. #8
    SitePoint Wizard wheeler's Avatar
    Join Date
    Mar 2006
    Location
    Gold Coast, Australia
    Posts
    1,369
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    thanks for all that info, I think I have a much better understanding of it all now.

    I' think i'll go with that model of setting up a testing server locally and pushing changes less regularly
    (ie. not on every save) to the production servers.

    BTW TortoiseSVN does have a "check for modifications" function that picks up changed files.
    Studiotime - Time Management for Web Developers
    to-do's, messages, invoicing, reporting - 30 day free trial!
    Thomas Multimedia Web Development

  9. #9
    Follow Me On Twitter: @djg gold trophysilver trophybronze trophy Dan Grossman's Avatar
    Join Date
    Aug 2000
    Location
    Philadephia, PA
    Posts
    20,578
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    One kind of side-note here. At one point I considered having off-site repository hosting a great backup method. If a hard drive crashed, I could just check out the code again, and if somehow the repository was lost, I still have the copy on the web server.

    While it's not common, repositories can become corrupted, even by only using commands from a Subversion client. And if you don't realize you've corrupted the repository until you update a local copy and end up with half the files missing, you've suddenly 0 good copies of the code instead of 2.

    So don't let the repository replace your existing backup methods.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •