Jump to content

How to create labels with command line


CodingGorilla

Recommended Posts

Seems like a simple thing... but I can't get it to work. I'm trying to do something similar to this example shown from "cm help label":

cm label lb:BL001 c:\workspace (label the changeset loaded in c:\workspace)

but when I try:

cm label lb:BL20 c:\myproject

I get this error:

The specified label spec can't be found. BL20

What am I missing here?

Link to comment
Share on other sites

You need to create the label first, the "cm label" command is useful for moving labels, for example move a label from one changeset to another, so it must exists first. If you want to label your current workspace you can do it as follows:

cm mklabel lb:BL001@rep_2@localhost:8084 .

You can also create the label and later apply it to a workspace or a certain changeset:

cm mklabel BL002

cm label lb:BL002@myRep@localhost:8084 c:\wks
cm label lb:BL002@myRep@localhost:8084 --changeset=1203 -c="first release"

Link to comment
Share on other sites

Hi CodingGorilla,

In order to query the created attributes:

cm find attributes

or more complex:

cm find attributes where type='status' and value='RESOLVED'

To apply a attribute to a given object:

cm setattribute att:status br:/main/SCM105 Integrated

To create a new attribute:

cm makeattribute status

And using the GUI you can open the "Attributes" view and customize the query by clicking in the "Advance" button. And if you need to create attributes from the GUI you can do it by clicking in the "Create new attribute" button inside the Attributes view.

Link to comment
Share on other sites

Cool.

When I do this:


cm find attributes where type='LastBaseline'
[/Code]

I get:

[Code]
Query error: unexpected token: ["LastBaseline",<10>,line=1,col=28]
[/Code]

It's not a big deal, I worked around it by just using a regular expression to parse the output. But is that normal?

I get similar errors with this command:

[Code]
cm find attributes on repository 'ThreeSixty'
Query error: expecting "STRING", found 'ThreeSixty'
[/Code]

What am I doing wrong? :(

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...