How to create baseline without changing version number

//Version baseliner code
/*This code is aimed at extracting the baseline function and putting it
into a one click wonder...*/
 
//Using the NextMinor function we are able to make DOORS instantiate the 
//baseline handle thereby incrementing the version number as we define it.
//The format is x.x[suffix] - major baselining increments the decimal predecessor
//minor baselining increments the successor.
 
//First set module to current module:
 
Module m = current
 
//create baseline
//must save before a baseline is created...
//This code baselines a static version; version number doesn't go up.
 
save(m)
infoBox("You have just baselined a revision baseline.""\n""This version will now close; please reload after it has done so. ")
Baseline LastBaseline = getMostRecentBaseline(m,false)
Baseline StaticBaseline = baseline(major LastBaseline, minor LastBaseline, "Static version")
create(StaticBaseline,"")

 


Hey all,

Having trouble with creating a baseline without using nextMajor/Minor functions. DOORS is able to make a baseline without incrementing the version number but for some reason I can't do this in code. Any clues?

TooDiff

 


TooDifficult - Thu Jan 27 17:49:38 EST 2011

Re: How to create baseline without changing version number
TooDifficult - Thu Jan 27 17:53:49 EST 2011

Also, the create function is designed to close the open module that's baselined. How do I open the exact same one up again automatically?

ToODiff

Re: How to create baseline without changing version number
Mathias Mamsch - Fri Jan 28 10:35:55 EST 2011

TooDifficult - Thu Jan 27 17:53:49 EST 2011
Also, the create function is designed to close the open module that's baselined. How do I open the exact same one up again automatically?

ToODiff

You should use the "Baseline b = suffix(string suff); create (m, b) " method to create a baseline without increasing the version. Since baselining will close your module, you need to open the most recent baseline after creating it.

Baseline b = suffix("abcde") 
Module m = current
ModName_ mn = module m
Baseline bNew = baseline(major b, minor b, suffix b)
create (m, b, "Blah") 
load(moduleVersion (mn, bNew), true)

 


Regards, Mathias

 

 


Mathias Mamsch, IT-QBase GmbH, Consultant for Requirement Engineering and D00RS

 

Re: How to create baseline without changing version number
SystemAdmin - Sun Jan 30 19:22:10 EST 2011

Mathias Mamsch - Fri Jan 28 10:35:55 EST 2011

You should use the "Baseline b = suffix(string suff); create (m, b) " method to create a baseline without increasing the version. Since baselining will close your module, you need to open the most recent baseline after creating it.

Baseline b = suffix("abcde") 
Module m = current
ModName_ mn = module m
Baseline bNew = baseline(major b, minor b, suffix b)
create (m, b, "Blah") 
load(moduleVersion (mn, bNew), true)

 


Regards, Mathias

 

 


Mathias Mamsch, IT-QBase GmbH, Consultant for Requirement Engineering and D00RS

 

I'm not sure if this was obvious to you, but the very handy code sample provided by Mathias required use of the version label Suffix as a means to be able to re-use the same Major and Minor version.

So you can have version labels like:

5.3 XYX
5.3 ABC
5.3 abc
But you cannot have a version label that uses the same Major and Minor value without there being some sort of differentiator such as different suffix's.

DOORS respects an important Configuration Management fundamental - no two version labels of a configuration managed item, such as a DOORS module, can be exactly the same.

If you're going to have multiple baselines where the only difference is the suffix, it's recommended that you devise some sort of logical syntax for the successive suffix's, and support each baseline by including a meaningful baseline description - otherwise version control is going to get ugly - and dare I ask - does your organisation or the project your working on have a Configuration or Version control plan of some sort? It doesn't have to be a 100 page skull crushing tome, but there must be some sort of instruction\plan that ensures a consistent version control approach.


Paul Miller
Melbourne, Australia

Re: How to create baseline without changing version number
llandale - Mon Jan 31 14:44:40 EST 2011

SystemAdmin - Sun Jan 30 19:22:10 EST 2011
I'm not sure if this was obvious to you, but the very handy code sample provided by Mathias required use of the version label Suffix as a means to be able to re-use the same Major and Minor version.

So you can have version labels like:

5.3 XYX
5.3 ABC
5.3 abc
But you cannot have a version label that uses the same Major and Minor value without there being some sort of differentiator such as different suffix's.

DOORS respects an important Configuration Management fundamental - no two version labels of a configuration managed item, such as a DOORS module, can be exactly the same.

If you're going to have multiple baselines where the only difference is the suffix, it's recommended that you devise some sort of logical syntax for the successive suffix's, and support each baseline by including a meaningful baseline description - otherwise version control is going to get ugly - and dare I ask - does your organisation or the project your working on have a Configuration or Version control plan of some sort? It doesn't have to be a 100 page skull crushing tome, but there must be some sort of instruction\plan that ensures a consistent version control approach.


Paul Miller
Melbourne, Australia

... and sucessive Suffixes should be alphabetical. Creating the first one 5.2(b) and the 2nd one 5.2(a) is going to give heart attacks to us INTJ folks, and their dying wish will be camel flea investations upon you.

  • Louie

Re: How to create baseline without changing version number
TooDifficult - Wed Feb 09 16:52:14 EST 2011

llandale - Mon Jan 31 14:44:40 EST 2011
... and sucessive Suffixes should be alphabetical. Creating the first one 5.2(b) and the 2nd one 5.2(a) is going to give heart attacks to us INTJ folks, and their dying wish will be camel flea investations upon you.

  • Louie

Hi everyone, thanks for the replies.

Mathias: why does your code create a baseline handle BNew, but create a baseline using b? Shouldn't it be create(m,bNew,"Blah")? Seems that the code is creating a handle for b and bNew, but only creating a baseline for b, and opening up bNew. It's like it's opening up the old baseline instead of loading the new one (different suffix).

Paul: I see. No, the organisation does not seem to have a proper version control system in DOORS, because we use Objective for that. However it would help to version DOORS documents so that the system is consistent with objective.

Thanks all!

TooDiff

Re: How to create baseline without changing version number
Mathias Mamsch - Wed Feb 09 17:11:06 EST 2011

TooDifficult - Wed Feb 09 16:52:14 EST 2011
Hi everyone, thanks for the replies.

Mathias: why does your code create a baseline handle BNew, but create a baseline using b? Shouldn't it be create(m,bNew,"Blah")? Seems that the code is creating a handle for b and bNew, but only creating a baseline for b, and opening up bNew. It's like it's opening up the old baseline instead of loading the new one (different suffix).

Paul: I see. No, the organisation does not seem to have a proper version control system in DOORS, because we use Objective for that. However it would help to version DOORS documents so that the system is consistent with objective.

Thanks all!

TooDiff

The Baseline type is just a collection of the 3 values major version, minor version and baseline suffix. Calling suffix will not create a baseline, but just do some checks and create a Baseline with unchanged major and minor version with respect to the current module. Normally I would expect to use only the one baseline handle 'b' to create the baseline, and to open it afterwards. Unfortunately it seems that creating the baseline will "burn" that handle, when I try to open the created baseline with the b handle, then I get an exception. So I copied the handle by creating a new baseline handle bNew and copying the major, minor and suffix over. With this it seems to work to open the baseline. Not nice, but I did not find a nicer way. Regards, Mathias

Mathias Mamsch, IT-QBase GmbH, Consultant for Requirement Engineering and D00RS