Daemon
Daemon

Reputation: 1675

Release multiple labels in clearcase

I am using ClearCase. I have created a snapshot view to release two issues.

Now problem is Label2 shows changes from both issue1 and issue2.

Is there a way we can avoid this, so that Label2 has changes only for issue2 and Label1 has changes only for issue1?

Is this possible, or is there any other way to achieve this?

Upvotes: 1

Views: 39

Answers (1)

VonC
VonC

Reputation: 1324447

If you have two separate issues that you want to consider separately, it is best to isolate them in their own respective branches.

Create two branches from a common ancestor (a point in time before working on either issue)

  • in branch Issue1, report your modifications dedicated to issue 1: you can then set the label Label1.
  • in branch Issue2, report your modifications dedicated to issue 2: you can then set the label Label2 without worrying about issue 1.

If having two branches (and two views) is not practical, then you would have to look for all versions not labelled Issue1 in order to set your Label2:

cleartool find . -cview -version !lbtype(Label1) -exec "cleartool mklabel Label2 \"%CLEARCASE_XPN%\""

Or you would need to find versions labelled both Label1 and Label2, and remove the Label2 one:

cleartool find . -cview -version "lbtype(Label1) && lbtype(Label2)" -exec "cleartool rmlabel Label2 \"%CLEARCASE_XPN%\""

Upvotes: 1

Related Questions