UNDOCHANGE

Description

Undoes the changes on a path.

Usage

cm undochange | unc <item_path>[ ...] [-R | -r | --recursive]

Options

Option / ArgumentDescription
-R | -r | --recursiveApplies the operation recursively.
item_pathItems to apply the operation. Use a whitespace to separate paths. Use double quotes (" ") to specify paths containing spaces. Use . to apply the operation to the current directory.

Help

Remarks

If an item is checked out or modified but not checked in and you do not want to check it in, you can undo the changes using this command. The item will be updated to the contents it had before.

Reading input from stdin

The 'undochange' command can read paths from stdin. To do this, pass a single dash "-". Example:

cm undochange -

Paths will be read until an empty line is entered. This allows you to use pipe to specify for which files to undo changes. Example:

dir /S /B *.c | cm undochange -

(In Windows, undoes the changes of all .c files in the workspace.)

Examples

cm unc .

(Undoes changes of the files on the current directory.)

cm undochange . -R

(Undoes changes of the files recursively on the current directory.)

cm unc file1.txt "file 2.txt"

(Undoes changes of the selected files.)

cm unc c:\workspace\file.txt

(Undoes changes of the selected file.)