plasticscmundelete

Plastic Command Line: How do I "Undelete" all files?


I'm trying to undelete all .wav files in a work space. I've got code to filter all the wave files that were deleted by using:

cm hist <sound folders> --format={1}

to get all the changesets affecting my sound folders and then filtering through log outputs

cm log cs:<changeset>

for the D deleted file names. Now that I have the names, I intended to use

cm undelete

but it's asking for revid or itemid and cs information I don't have and can't seem to query since the item is deleted.

I'm hoping there is an awesome command line that might allow me to undelete all files of a certain type. If this is possible from plastic PCM or Plastic Gluon, that is an option also.

Thanks!


Solution

  • When running the "cm log" command, you can get the revision ids of the items to undelete. This revid is necessry to undelete the items with the "cm undelete" command.

    cm log cs:1 --itemformat="{newline} {revid} {shortstatus} {path}"