svn - Setting up a complex stage environment with open source tools -


i've searched series of tubes awhile , haven't found answers question due lack of understanding on part of question readers of use cases going excruciatingly detailed. example question: create "label" in subversion indicating files should in next release (the 5 vote answer seems close, not quite there) , question: using subversion tags deploy development/staging/testing server similar mine except people attempting answer don't seem understand subtleties.

i'm setting more sophisticated staging environment fast growing project. current environment consists of main production branch along build branches. builds not problem can tag head revision of build branch when it's "done" , merge production. piece more subtle being able setup automated process tags arbitrary set of files @ arbitrary revision each file label can sync label out staging servers. in scm world label overloaded explicitly state in case using label in perforce (http://www.perforce.com/perforce/doc.current/manuals/cmdref/label.html) sense of word meaning name set of files files @ arbitrarily chosen revisions , set mutable.

so give simple example: suppose have file , b. file a's head revision revision 13 of file , file b's head revision revision 4. in production have a@10 , b@2. changes file have been qad , has been determined it's ready patch out. first change file b (revision 3) ready patch business side has determined head change (revision 4) needs worked on little more shouldn't patch , gets pushed out later date. patching production need tag b@3 , a@13 release. says "ohh use tags in ". that's , 20110703 nightly patch. in stage environment want able test not-necessarily-head-revision files in state best described "if tag branch right like" state throughout day (week, month, etc). don't me wrong don't want bunch of coding in production branch, it's necessary.

the 1 point i've glossed on far there ticketing system commits associated tasks/tickets , tasks/tickets related particular release date. workflow user creates task, attaches code in form of changesets (with one-task-to-many-changesets relationship), task progresses through approval process, , christened ready patch. there series of automated scripts determine file revisions going patch out on day x , sync staging environments (or production) appropriate versions of files. specific script im having trouble 1 given set of tasks, , through them changesets, ready patch able sync set of files appropriate revisions emulate future production patch like. if use perforce accomplish labels mutable , hold collection of (filename, filerevision) values user can sync to. i'm looking use open source tools , tools integrate redmine (yes still need build ticket-to-changeset association layer).

so questions are.

  1. are there open-source scms have concept of label in them? i've looked little @ mercurial , queues extension it, once again, seems solve similar not quite same problem. (feel free correct me , "nope queues solve this...")
  2. if there aren't tools work way, suggestions how best set up? can write script kinda fakes labels , manually syncs each individual file seems bad in many ways.

basically i'm looking able allow actions task being moved out few days or transitioning non-patchable patchable state able affect state of code on staging servers put them in "this we're planning on patching" state without human intervention after task changes.

thanks help.

[this answer attempts summarise discussion in comments above.]

modern dvcs (eg. git, mercurial) manage changes sequences of commits, rather sets of files. because if different paradigm, difficult think of "label" selects particular files particular revisions. commits may touch several files, , commits can both touch given file (though change inside file may or may not overlap).

to manage staged release using git, is:

  1. grab previous release branch.
  2. pull each branch or cherry-pick each commit intended in next staging test (you can on development workstation).
  3. push staging repository.
  4. pull staging server.
  5. when staging checks out okay, pull same branch production.

in (hopefully) common case there aren't changes don't want, step 2 becomes single-step merge. if don't want particular change, can cherry-pick changes do want.

some helpful resources:


Comments

Popular posts from this blog

c# - SharpSVN - How to get the previous revision? -

c++ - Is it possible to compile a VST on linux? -

url - Querystring manipulation of email Address in PHP -