How best to branch in Clearcase?

后端 未结 3 2133
感动是毒
感动是毒 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:51

    We use Clearcase, and we find that creating a branch for a release is often much easier than doing it by task. If you do create it by task, then I'd have a 'main branch' for that release, and branch the tasks off that branch, and then merge them back in when finished to merge them back to the trunk.

    0 讨论(0)
  • 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.
    0 讨论(0)
  • 2021-01-06 19:08

    You can get the creation date for a branch by using the describe command in cleartool.

    cleartool describe -fmt "%d" -type martin_2322
    

    This will printout the date and time that the branch was created. You can use this to implement your first option. For more information, you could read the following cleartool man pages, but hopefully the above command is all you need.

    cleartool man describe
    
    cleartool man fmt_ccase
    
    0 讨论(0)
提交回复
热议问题