# # patch "monotone.texi" # from [c7f7412e243d80906257b50f2df8fa121c17b95a] # to [25aefab5f0b031f4017e8ff342826e89fe5806dc] # ======================================================================== --- monotone.texi c7f7412e243d80906257b50f2df8fa121c17b95a +++ monotone.texi 25aefab5f0b031f4017e8ff342826e89fe5806dc @@ -4524,6 +4524,8 @@ command, used for scripting monotone. All give output on stdout; they may also give useful chatter on stderr, including warnings and error messages. +Any command emitting revision ids support optional formatting +specifiers (@pxref{Formatting automate output}). @ftable @command @@ -5574,6 +5576,108 @@ @end ftable @page address@hidden Formatting automate output,,,Automation address@hidden Formatting automate output + +Every automation command emitting lists of revision ids supports two +optional formatting specifiers: + + address@hidden +Generate an xml document based on automate output and containing full +revision and changeset data. + address@hidden@i{}} +Applies the specified format string at automate output. + + +The format string is made by a common part, applied to each revision, +and one or more optional changeset subformats, applied to changeset +data. +Changeset subformats are enclosed beetween braces and start with an +uppercase formatting specifier, e.g. an expression using the 'added +files' subformat is address@hidden@} . +Everything inside the braces is repeated for every matching +changeset item. For example, address@hidden: address@hidden prints every added file +prefixed by 'add: ' and followed by a newline. +Some formatting specifier have also a short form, obtained prepending +an 's' to the specifier code. As an example, the short form of the %d +specifier is %sd. + +Base formatting specifiers: address@hidden +%[s]a : value of author certificate +%[s]b : value of branch certificate +%[s]d : value of date certificate +%e : value of comment certificate +%[s]i : revision id +%l : value of changelog certificate +%r : value of testresult certificate +%t : value of tag certificate +%[s]m : manifest id +%+ : terminates formatting for the current revision. The next revision +will be formatted by the specifiers following %+ +%% : the '%' character. Could also be obtained by \% (see below) address@hidden verbatim + +Changeset formatting specifiers: address@hidden +%P : ancestors +%A : added files +%D : deleted files +%E : deleted dirs +%R : renamed files +%C : renamed dirs +%M : modified files address@hidden verbatim + +The short forms have the following meanings: for ids, the first 8 +characters. For author, everything before the first @ symbol. For +branch, everything after the last '.' character. For date, everything +before the first 'T' character. + +%P,%A,%D,%E,%M supports the private specifier %f, substituted with the +file/directory/ancestor name/id. +%R and %M supports the specifiers %f, current file/directory name and +%o, old file/directory name. + +Plus, all format string support the \n, \r, \a, \t, \b, \f, \v +modifiers with the usual c-like meaning. +\\, \% and address@hidden are used to obtain the \, % and @} char respectively. + +The default format string is '%i\n'. + +The specifier %+ is used to apply alternating format strings to +different revisions. When found, a %+ specifiers terminates the +formatting of current revision. +The next revision to be formatted will 'see' only the format string +following the %s. +To have a two column author output you will use a '%a %+ %a\n' format +string. +Note: without the %+, the formatting specifiers could still be given +multiple times, but their output will refer to the same revision. +Consider as an example two commits, one by jim@@juicebot.co.jp and one +by beth@@juicebot.co.jp. + +The format string '%a %a\n' will give you + address@hidden address@hidden +jim@@juicebot.co.jp jim@@juicebot.co.jp +beth@@juicebot.co.jp beth@@juicebot.co.jp address@hidden group address@hidden smallexample + +where '%a %+ %a\n' gives instead + address@hidden address@hidden +jim@@juicebot.co.jp beth@@juicebot.co.jp address@hidden group address@hidden smallexample + + address@hidden @node RCS @section RCS