undo

Undo changes in a local workspace.

Purpose

The scm undo subcommand undoes changes to files or folders in a local workspace. If a file has uncommitted (not checked in) changes, scm undo removes them. If a file has changes that are part of an incomplete change set, scm undo removes the changes from that change set.

Synopsis

Options and arguments

-d  |  --dir ] workspace-path
The path name of a local workspace created by scm load or scm share. This subcommand runs with workspace-path set as the current working directory. You can omit this option if the current working directory is in a local workspace.
-P  |  --password ] password for user ID in repository
The password for the specified user ID in the named repository. If this option is not included on the command line, you are prompted for a password. If you specified a repository URI or nickname for which you have stored credentials using the scm login command, this option is ignored.
-u  |  --username ] user ID in repository
Specifies a user ID that exists in the named repository. If you specified a repository URI or nickname for which you have stored credentials using the scm login command, this option is ignored.
-v  |  --verbose ]
Provide additional informational messages while operating.
changes ...
Space-separated list of path names of files or folders with changes to undo. Path names must start at root of the local workspace.

Examples

Working in a local workspace, create a new file, then check it in:

C:\local-workspaces\HelloJazz>type com.example.hellojazz.rcp.ui\src\com\example\hellojazz\rcp\ui\actions\messages.properties
Greeting=Hello
ProdName=Jazz

C:\local-workspaces\HelloJazz>scm checkin com.example.hellojazz.rcp.ui\src\com\example\hellojazz\rcp\ui\actions\messages.properties
Committing...
Workspace: (1101) "HelloJazz" <-> (1102) "HelloJazz Stream"
  Component: (1103) "HelloJazz"
    Outgoing:
      Change sets:
        (1116) --@ <No comment>

Add a second line to the file, but do not check it in:

C:\local-workspaces\HelloJazz>type com.example.hellojazz.rcp.ui\src\com\example\hellojazz\rcp\ui\actions\messages.properties
Greeting=Hello
ProdName=Jazz
Flattery=Looking good

Run scm undo to remove the uncommitted change:

C:\local-workspaces\HelloJazz>scm undo com.example.hellojazz.rcp.ui\src\com\example\hellojazz\rcp\ui\actions\messages.properties
C:\local-workspaces\HelloJazz>type com.example.hellojazz.rcp.ui\src\com\example\hellojazz\rcp\ui\actions\messages.properties
Greeting=Hello
ProdName=Jazz


Feedback

Did this help? You can provide feedback at Jazz.net (registration required): Comment in the forums or submit a bug