Cct command

From PlcWiki

(Difference between revisions)
Jump to: navigation, search
(Settings on multiple stations)
 
(6 intermediate revisions not shown)
Line 1: Line 1:
= Usage:=
= Usage:=
-
cct [-h|--help] [-v|--verbose] [-n|--no-verbose] [-c|--no-commit]\
+
cct [-h|--help] [-v|--verbose] [-n|--no-verbose] [-c|--no-commit] [-r|--no-review] [-b|--background]\
         locked <ccturi>
         locked <ccturi>
         lock <ccturi> <locking ID>
         lock <ccturi> <locking ID>
Line 25: Line 25:
         forallwp <command>
         forallwp <command>
         onallwp <command>
         onallwp <command>
-
         wp
+
         setkey <ccturi> key = value
-
         plan
+
         fakesetkey <ccturi> key = value
-
         partdistribution
+
         setexistingkey <ccturi> key = value
 +
        fakesetexistingkey <ccturi> key = value
 +
        checkkey <ccturi> key
         version <ccturi>
         version <ccturi>
Line 68: Line 70:
     plan|pla|pl
     plan|pla|pl
     partdistribution|pd|parts|part|par
     partdistribution|pd|parts|part|par
 +
 +
=Direct setting of a key=
 +
Example:
 +
cct setkey @@f1 WorkPlace.ToDoWindow.Width = FULL
 +
 +
The change can be reviewed afterwards in the editor. If you are not happy with the result and want to keep existing contents, make any change to the file to prevent autocommit and then abort the commit by providing an empty message and typing ''a'' for abort.
 +
 +
The key value can be also set without review, use ''-r'' or ''-no-review'' switch, '''but make sure the value was set as expected''' (check the command output):
 +
 +
cct -r setkey @@f1 WorkPlace.ToDoWindow.Width = FULL
 +
 +
Alternatively you can use command ''fakesetkey'' for a dry run. ''fakesetkey''  works exactly the same as ''setkey'' just doesn't actually change anything.
 +
 +
If you want to set the key only in case it already exists in the configuration file (i.e. no additions), use command ''setexistingkey'' or ''fakesetexistingkey''.
 +
 +
If the value contains spaces or special characters like *, ', (, ), {, }, $, \, ? ..., make sure to properly quote the value [http://www.gnu.org/software/bash/manual/bashref.html#Quoting]
=Settings on multiple stations=
=Settings on multiple stations=
Line 74: Line 92:
  cct forallwp cct -r setkey @@@wpid WorkPlace.Tightening.StrictPSetCheck = Yes
  cct forallwp cct -r setkey @@@wpid WorkPlace.Tightening.StrictPSetCheck = Yes
  cct forallwp cct deploy @@@wpid
  cct forallwp cct deploy @@@wpid
 +
 +
'''BEWARE: These commands set the key on all stations without asking questions. Use only if you 100% sure the command works as expected. Consider running without ''-r'' option or using ''fakesetkey'' command. Be sure to properly quote the value. See [[#Direct setting of a key]] for more.'''

Current revision as of 09:28, 4 March 2013

Contents

Usage:

cct [-h|--help] [-v|--verbose] [-n|--no-verbose] [-c|--no-commit] [-r|--no-review] [-b|--background]\
       locked <ccturi>
       lock <ccturi> <locking ID>
       lockinfo <ccturi>
       unlock <ccturi>
       path <ccturi>
       glob <ccturi>
       cat <ccturi>
       save <ccturi>
       vi <ccturi>
       edit <ccturi>
       deploy <ccturi>
       fakedeploy <ccturi>
       editdeploy <ccturi>
       videploy <ccturi>
       checkout
       commit <ccturi> <message>
       log <ccturi>
       diff <ccturi>
       diffdeployed <ccturi>
       revert <ccturi>
       blame <ccturi>
       update <ccturi>
       forallwp <command>
       onallwp <command>
       setkey <ccturi> key = value
       fakesetkey <ccturi> key = value
       setexistingkey <ccturi> key = value
       fakesetexistingkey <ccturi> key = value
       checkkey <ccturi> key
       version <ccturi>

ccturi:

  • cct://<cct path>
  • @<cct path with wildcars (*?~)>
  • @@<wpid>|plan|part
  • <absolute path>
  • <relative path>

cct path:

  • path relative to CCT base, e.g. workplaces/K1/etc/plc_client_K1.cfg

Command shortcuts

   locked|ld|locke
   lock|l|lo|loc
   lockinfo|li
   unlock|u|un|unl|unlo|unloc
   path|p|pa|pat
   glob|g|gl|glo
   cat|c|ca
   save|sav|sa|s
   vi
   edit|e|edi
   deploy|de|dep|depl|deplo
   fakedeploy|fd|fakedeplo|fakedepl|fakedep|fakede|faked|fake|fak|fa
   editdeploy|ede|ed
   videploy|vde|vd
   checkout|co|ch|che|chec|check|checko|checkou
   commit|ci|com|comm|commi
   log|lg
   diff|d|di|dif
   diffdeployed|dd
   update|up|upd|upda|updat
   version|v|ve|ver|vers|versi|versio
   blame|blam|bla|b|annotate|praise
   revert|rever|reve|rev|re
   forallwp|faw
   onallwp|oaw
   wp|w
   plan|pla|pl
   partdistribution|pd|parts|part|par

Direct setting of a key

Example:

cct setkey @@f1 WorkPlace.ToDoWindow.Width = FULL

The change can be reviewed afterwards in the editor. If you are not happy with the result and want to keep existing contents, make any change to the file to prevent autocommit and then abort the commit by providing an empty message and typing a for abort.

The key value can be also set without review, use -r or -no-review switch, but make sure the value was set as expected (check the command output):

cct -r setkey @@f1 WorkPlace.ToDoWindow.Width = FULL

Alternatively you can use command fakesetkey for a dry run. fakesetkey works exactly the same as setkey just doesn't actually change anything.

If you want to set the key only in case it already exists in the configuration file (i.e. no additions), use command setexistingkey or fakesetexistingkey.

If the value contains spaces or special characters like *, ', (, ), {, }, $, \, ? ..., make sure to properly quote the value [1]

Settings on multiple stations

Example:

cct forallwp cct -r setkey @@@wpid WorkPlace.Tightening.StrictPSetCheck = Yes
cct forallwp cct deploy @@@wpid

BEWARE: These commands set the key on all stations without asking questions. Use only if you 100% sure the command works as expected. Consider running without -r option or using fakesetkey command. Be sure to properly quote the value. See #Direct setting of a key for more.

Personal tools