SitePoint Sponsor

User Tag List

Results 1 to 5 of 5
  1. #1
    SitePoint Wizard triexa's Avatar
    Join Date
    Dec 2002
    Location
    Canada
    Posts
    2,476
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Suggestions to handle this SVN workflow?

    So we have recently put everything into SVN and each developer has their own working copy.

    We commit and a post-commit hook updates the dev server so we can check it before pushing live. We then sync with live to push those changes forward.

    However, what if I have committed something major or not yet completely finished that needs further testing/review/etc. - something that if pushed live would conflict with the state on live.

    Someone else comes along and fixes a typo in the same file, commits it... but how do we push it live?

    We obviously want to push their smaller change live immediately, but it resides in a common file that might have also had a critical change from myself?

    Would love to hear any suggestions/workarounds for this scenario!
    AskItOnline.com - Need answers? Ask it online.
    Create powerful online surveys with ease in minutes!
    Sign up for your FREE account today!
    Follow us on Twitter

  2. #2
    I'll take mine raw silver trophy MikeFoster's Avatar
    Join Date
    Dec 2002
    Location
    Alabama, USA
    Posts
    2,560
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I'm not an SVN guru but here are some thoughts...

    It sounds like everyone is working directly on the trunk, right?

    However, what if I have committed something major or not yet completely finished that needs further testing/review/etc. - something that if pushed live would conflict with the state on live.
    I would do this work on a branch, and then only merge it with trunk when it is considered stable. The post-commit hook should be such that it does not deploy branches, only trunk.

    Someone else comes along and fixes a typo in the same file, commits it... but how do we push it live?
    This small change would be done on the trunk.

  3. #3
    SitePoint Wizard triexa's Avatar
    Join Date
    Dec 2002
    Location
    Canada
    Posts
    2,476
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Could someone clarify the merge process assuming you are commiting to a branch and need to move SOME changes into the trunk?

    Likewise, I made a quick/critical bugfix directly to the trunk and now I need to make sure my branch (and other dev branches?) are updated with that change.

    Am using TortoiseSVN
    AskItOnline.com - Need answers? Ask it online.
    Create powerful online surveys with ease in minutes!
    Sign up for your FREE account today!
    Follow us on Twitter

  4. #4
    I'll take mine raw silver trophy MikeFoster's Avatar
    Join Date
    Dec 2002
    Location
    Alabama, USA
    Posts
    2,560
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Bring up the TortoiseSVN right-click menu, choose "Help", read "5.19. Merging".

    I think what you want is under the heading "Merge a range of revisions". I've never used that, so I can't say much more about it.

  5. #5
    SitePoint Author silver trophybronze trophy
    wwb_99's Avatar
    Join Date
    May 2003
    Location
    Washington, DC
    Posts
    10,635
    Mentioned
    4 Post(s)
    Tagged
    0 Thread(s)
    First, take an hour or so and read the first few chapters of the SVN book. It will help you a lot.

    As for the problem at hand, have you ever considered using a branch as your "release" repository, rather than using the trunk as the arbitrator of stuff. For bonus points, you can restrict commit access to that particular branch to trusted souls.

    And for major changes, using branches makes tons of sense. I actually do my development nearly purely in branches, only merging back to the trunk when something gets real stable.


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
  •