How best to branch in Clearcase?

后端 未结 3 2159
感动是毒
感动是毒 2021-01-06 18:18

I\'ve previously documented my opinions on Clearcase as a source control system, but unfortunately I am still using it. So I turn to you guys to help me alleviate one of my

3条回答
  •  庸人自扰
    2021-01-06 18:54

    A few comments:

    • a branch per task is the right granularity for modifying a set of file within a "unit of work". Provided the "task" is not too narrow, otherwise you end up with a gazillon of branches (and their associated merges)

    • when you create a config spec for a branch, you apparently forget the line for new elements (the one you "add to source control")

    • Plus you may consider branching for a fix starting point, which would solve the "old version of A.cs - the one that was latest in main when the branch was created" bit.
      I know you have too much labels already, but you could have a script to "close" a task which would (amongst other things) delete that starting label, avoiding label cluttering.

    Here the config spec I would use:

    element * CHECKEDOUT 
    element * .../martin_2322/LATEST  
    element * STARTING_LABEL_2322 -mkbranch martin_2322 
    # selection rule for new "added to source control" file
    element * /main/0 -mkbranch martin_2322 
    load /Project/Application
    

    I would find this much more easier than computing the date of a branch.

    • do not forget you can merge back your task to main, and merge some your files from your finished task branch to the your new current task branch as well, if you need to retrofit some your fixes back to that current task as well.

提交回复
热议问题