How do I identify what branches exist in CVS?

前端 未结 6 719
一个人的身影
一个人的身影 2021-02-04 00:12

I have a legacy CVS repository which shall be migrated to Perforce.

For each module, I need to identify what branches exist in that module.

I just want a list of

6条回答
  •  佛祖请我去吃肉
    2021-02-04 01:08

    You could simply parse log output of cvs log -h. For each file there will be a section named Symbolic names :. All tags listed there that have a revision number that contains a zero as the last but one digit are branches. E.g.:

    $ cvs log -h
    
    Rcs file : '/cvsroot/Module/File.pas,v'
    Working file : 'File.pas'
    Head revision : 1.1
    Branch revision : 
    Locks : strict
    Access :
    Symbolic names :
        1.1 : 'Release-1-0'
        1.1.2.4 : 'Release-1-1'
        1.1.0.2 : 'Maintenance-BRANCH'
    Keyword substitution : 'kv'
    Total revisions : 5
    Selected revisions : 0
    Description :
    
    ===============================================
    

    In this example Maintenance-BRANCH is clearly a branch because its revision number is listed as 1.1.0.2. This is also sometimes called a magic branch revision number.

提交回复
热议问题