How to defer a multi-line clearcase comment using cleartool (-fmt) format

Is it possible to re-create the standard "desc" command for indenting comments using the cleartool format string?

Example:

cleartool desc <version> outputs something like

 version "<extended version path>" created <date> by <user> "comment line 1 comment line 2 ... comment line n" ... 

Is there a -fmt option to create similar output with a custom format?

+4
source share
1 answer

Not directly, regarding the indentation of the part.
fmt_ccase man page offers an extended version path, date, user and comment, but you can only add spaces or tabs (i.e. "escape sequences") before each field, do not place tabs in the middle of one of these fields (e.g. tabs before each line of comment)

 cleartool descr -fmt "version \"%Xn\"\ncreated %d by %u\n\t\"%c\"" afile 

Note that one example indicates that spaces before the field are repeated for all lines of this field:

Run output from lshistory –long .
Note that in cleartool mode with a single command, backslashes ( \ ) are used to escape double quotes in the format string.

 cleartool lshistory -fmt "%d %Fu (% u@ %h)\n %e \"%n\"\n \"%Nc\"\n" util.c 2007-05-11T09:24:38 Anne Duvo ( anne@neptune ) create version " util.c@ @\main\3" "fix bug r2-307" 2007-05-10T09:09:29 Ravi Singha ( ravi@mercury ) create version " util.c@ @\main\2" "ready for code review" . . . 
+2
source

Source: https://habr.com/ru/post/1382583/


All Articles