Jump to content

What is an attribute "realization"?


ferdBerful

Recommended Posts

cm removeattributerealization --help

 

says:

 

...

    A previously attribute set in an object will be removed by using this
    command. The attribute realization in the object is removed, but not the
    attribute.

...

 

What is an attribute realization?

 

The word "realization" only appears in the help for removeattributerealization

How do I know?

 

I created a script to create a cm man page of sorts:

 

#!/bin/sh

# create a Plastic "man page"

cmVersion="`cm version`"
echo ""
echo "Plastic cm version $cmVersion man page"

cmdListFile="/tmp/cmCmdList"
cm showcommands --all | sed -n -e '/^[a-z]/s/ .*$//p' | sort > $cmdListFile

echo ""
echo "cm <cmdName> --help for the following commands:"
while read cmd
do
    echo "    $cmd"
done < $cmdListFile

echo ""
echo "(alphabetical)"

while read cmd
do
    echo ""
    echo "--------------------------"
    echo "$cmd --help"
    echo "--------------------------"
    echo ""
    cm $cmd --help | sed -e 's/^M//' -e 's/ *$//'

done < $cmdListFile
 

Link to comment
Share on other sites

Hi ferdBerful,

 

An attribute realization is just the resulting object of applying an attribute to another given object (branch/cset/label/etc.). Each attribute realization stores the particular value that the affected object will have for the related attribute. Removing an attribute realization will only remove the relationship between the attribute and the targeted object (i.e. "unapply" the attribute). This CLI command (removeattributerealization) is equivalent to clicking on the red X button shown in the Windows GUI Attributes panel (on the right handside of each attribute value). See https://www.plasticscm.com/documentation/gui/plastic-scm-version-control-gui-guide.shtml#CommandsintheBranchExplorerView

attribute.png

 

 

Did this information help you? Please let us know if you still have questions about this matter.

 

Thank you!

 

Regards,

Miguel

Link to comment
Share on other sites

This is helpful. I think I understand better. Please confirm:

 

When you make an attribute it's like making a group in Linux. The group doesn't apply to any user until you

change the Linux user to be a member of the group. (Not exactly the same, you actually add a user to a group)

Adding the group to a user "realizes": it.

 

Another analogy is making a label. A label does not have any affect until you put it on an object.

 

cm has 3 command that deal with the attribute itself:

 

makeattribute

removeattribute

renameattribute

 

and 2 commands that deal with attribute realization:

 

removeattributerealization

setattribute

 

Is this correct?

 

If so, a good alias for removeattributerealization would be removeattributefromobject

(actually, removeAttributeFromObject would be even better, but it doesn't look like

cm commands are case insensitive)

 

Question: If I remove an attribute, will all the attribute realizations be be removed

                from all objects?

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...