I could not find a syntax for “current changeset”, but since cm log accepts the output of cm status as changeset identifier:
for /F "tokens=*" %l in ('call cm status --nochanges') do (call cm log %l --itemformat )
Or in batch file form:
for /F "tokens=*" %%l in ('call cm status --nochanges') do (call cm log %%l --itemformat )
Two important parts of the trick that ensure each command only outputs what is needed:
- The empty
--itemformat specification for cm log indicates that no details about files should be logged.Without it, cm log will list both the changeset information and information about each item in the changeset.
- The other trick is
--nochanges for cm status: it only shows the status line, and no other changes.Without it, cm status will emit one line per changed file.
–jeroen
Read the rest of this entry »