discard

Discard changes from a workspace.

Purpose

The scm discard subcommand discards change sets from a workspace.

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 change sets to discard. You can specify each change set as an alias, UUID, or work-item number.

Examples

Working in a local workspace, scm status output indicates an undelivered change set..

C:\local-workspaces\HelloJazz>scm status

Workspace: (1101) "HelloJazz" <-> (1102) "HelloJazz Stream"

  Component: (1103) "HelloJazz"

    Baseline: (1108) 3 "beta2 updates"

    Outgoing:

      Change sets:

        (1110) --@ <No comment>

Run scm discard, specifying the change set by its alias, to discard the change set.

C:\local-workspaces\HelloJazz>scm discard 1110

If you run scm status again, you can see that change set is no longer in the workspace.

C:\local-workspaces\HelloJazz>scm status

Workspace: (1101) "HelloJazz" <-> (1102) "HelloJazz Stream"

  Component: (1103) "HelloJazz"

    Baseline: (1108) 3 "beta2 updates"


Feedback